MYSQL用户等入问题??
建立两个MYSQL用户,分别如下:host name
1 % test
2 localhost mysql
在登入的时候:
用户1:test mysql -u test -p 输入密码的时候显示错误,而不用密码能登录
# mysql -u test -p
Enter password:
ERROR 1045 (28000): Access denied for user 'test'@'localhost' (using password: YES)
# mysql -u test
Welcome to the MySQL monitor.Commands end with ; or \g.
Your MySQL connection id is 48
Server version: 5.0.37 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
用户2:mysql 等入是正常
# mysql -u mysql -p
Enter password:
Welcome to the MySQL monitor.Commands end with ; or \g.
Your MySQL connection id is 49
Server version: 5.0.37 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
用户1不是在哪都能等入吗?怎么在着不用输密码阿?而且输入密码就无法等入了?? 是由MySQL权限表控制的,用以下SQL查看一下是什么情况:
mysql> select host,user,password from mysql.user;
或
mysql> show grants for test;
mysql> show grants for mysql;
就清楚了
页:
[1]