At 15:18 -0800 2/23/04, Jim Richardson wrote:
Installing a new RHEL box, with 3.23.58. (it's what RH provides, and I
don't feel like using stuff from out of the RH tree.) I am a little
confused about the privileges. I have done a GRANT ALL on *.* to root IDENTIFIED BY 'password';
which is great, but if I run mysql so


mysql -u [EMAIL PROTECTED]

I get in, no password. How can I tell mysql to refuse anything that
isn't from localhost, and to require a password for root no matter what?
Thanks. New to MySQL and databases in general, trying to make sure I
don't screw up too badly.

When you specify an account name for the GRANT statement, if you specify only the username part, the hostname part defaults to '%'. So your GRANT statement is actually equivalent to GRANT ... TO 'root'@'%'.

Clobber that account and specify GRANT ... TO 'root'@'localhost' instead.
Then root will be able to connect only from the localhost.

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to