- 论坛徽章:
- 0
|
回复 #11 ruochen 的帖子
嗯,重启后就可以了:
---------------------------
[root@MySQLServer ~]# service mysqld restart
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]
[root@MySQLServer ~]# mysql -utest2 -hlocalhost -pabc
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.22
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select user();
+-----------------+
| user() |
+-----------------+
| test2@localhost |
+-----------------+
1 row in set (0.01 sec)
mysql> select user,host,password from mysql.user;
ERROR 1044 (42000): Access denied for user 'test2'@'localhost' to database 'mysql'
mysql> |
|