l****n 发帖数: 12 | 1 我想删除匿名用户,但是出错,怎么解决,谢谢!
$ /usr/local/mysql/bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 49 to server version: 3.22.32-log
Type 'help' for help.
mysql> delete from user where user="";
ERROR 1046: No Database Selected
mysql> delete from user where user=" ";
ERROR 1046: No Database Selected
mysql> delete from user where user=' ';
ERROR 1046: No Database Selected
mysql> delete from user where user='';
ERROR 1046: No Databa |
m*****e 发帖数: 126 | 2 MySQL can hold more than 1 databases. So you have to choose which
is the current one.
Type command 'use user;'
【在 l****n 的大作中提到】 : 我想删除匿名用户,但是出错,怎么解决,谢谢! : $ /usr/local/mysql/bin/mysql -u root -p : Enter password: : Welcome to the MySQL monitor. Commands end with ; or \g. : Your MySQL connection id is 49 to server version: 3.22.32-log : Type 'help' for help. : mysql> delete from user where user=""; : ERROR 1046: No Database Selected : mysql> delete from user where user=" "; : ERROR 1046: No Database Selected
|
dy 发帖数: 12 | 3 Should be "use mysql" ba. That's the database which holds the "user" table.
【在 m*****e 的大作中提到】 : MySQL can hold more than 1 databases. So you have to choose which : is the current one. : Type command 'use user;'
|
m*****e 发帖数: 126 | 4 Yes, you are right! There is no such thing as a user database.
【在 dy 的大作中提到】 : Should be "use mysql" ba. That's the database which holds the "user" table.
|