In mysql, a "user" is a combination of user and hostname. Initially, there are 2 superusers, [EMAIL PROTECTED] and [EMAIL PROTECTED] They have the same privileges, but they are different users. [EMAIL PROTECTED] is for connections via unix socket (from the same machine on which the mysql server is running). [EMAIL PROTECTED] is for tcp/ip connections. As % is a wildcard, [EMAIL PROTECTED] can log into mysql from any machine in the world. Not a good idea!

If you must allow superuser connections from other machines, you are better off limiting the allowed hosts as much as possible. Replace [EMAIL PROTECTED] with [EMAIL PROTECTED], for example, where xxx.yy.zz is your subnet.

See the manual for details:

<http://dev.mysql.com/doc/mysql/en/Privileges.html>
<http://dev.mysql.com/doc/mysql/en/GRANT.html>

Michael

Whil Hentzen wrote:

[EMAIL PROTECTED] doesn't have a password yet.  You need to
  mysqladmin -u root password "newpwd"
where "newpwd" is the password you want for root.
After setting the password for [EMAIL PROTECTED], you can connect with
  mysql -u root -p
I'd suggest that [EMAIL PROTECTED] is a bad idea, so I'd

  DELETE FROM mysql.user WHERE user='root' AND host='%';
  FLUSH PRIVILEGES;

but if you want it, you should definitely set a password for it as well.
In that case,


Being new to MySQL admin stuff, it would seem to me that you would lose all sorts of valuable capabiltiies if you delete the root user from the MySQL table?



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



Reply via email to