It/'s also a good thing to create one or more users and associate them with individual databases for the purposes of developing scripts or using your own script. This command let/'s you create a new user and give that user permissions to use a database called test_db you created with the command CREATE DATABASE test_db:
GRANT ALL ON test_db.* TO testusr@localhost IDENTIFIED BY /"testusrpw/";Nickname: gizmola on: 2003-12-13 17:07:12--http://en.phpfans.net/qa/31288123620.html
这样可以绕过这个root密码为空的问题。
Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user 'root'.