我在root下:
grant all privileges on . to aa@'localhost' identified by "aaa";
flush privileges;
这时使用aa用户是可以访问所有数据库的。
如果我:
grant all privileges on testdb.* to bb@'localhost' identified by "bbb";
flush privileges;
这时可以链接数据库,但是什么也干不了,甚至不能use testdb;
请问这是为什么?是哪里没有设置正确吗?
我用bb账户使用MySQL后,使用show databases;都会有问题,报错信息为:
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 64
Current database: *** NONE ***
ERROR 1184 (08S01): Aborted connection 64 to db: 'unconnected' user: 'bb' host: 'localhost' (init_connect command failed)