Redian新闻
>
MySQL数据库用户管理求助
avatar
MySQL数据库用户管理求助# Database - 数据库
l*n
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
avatar
m*e
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

avatar
dy
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;'

avatar
m*e
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.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。