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.
Thanks for your help. I realize now I was misunderstanding something,
that anyone can log into mysql from localhost, but they can't *do* much
of anything except with test_ databases. That was part of my problem,
the rest was answered with your post. Thanks. Now back to reading the
MySQL book, the author's name seems familiar... :)
-- Jim Richardson http://www.eskimo.com/~warlock "$HOME is where your dotfiles are" - Gym Quirk
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]