mysql为什么默认有那么多root用户,还有用户名为空的用户

 我来答
雪V歌
2016-07-12 · 知道合伙人数码行家
雪V歌
知道合伙人数码行家
采纳数:78694 获赞数:222959
泉州兴瑞发公司2015-2017最佳优秀员工。

向TA提问 私信TA
展开全部
1、用root身份登入 进入mysql库 修改user表即可。
2、操作如下:
G:\phpStudy\MySQL\bin>mysql -uroot -proot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 391
Server version: 5.0.51b-community-nt-log MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql;
Database changed
mysql> update user set user='xly' where user='root';
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
mysql> select user,host,password from mysql.user;
+------+-----------+-------------------------------------------+
| user | host | password |
+------+-----------+-------------------------------------------+
| xly | localhost | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
| yxl | localhost | *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 |
| xly | % | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
+------+-----------+-------------------------------------------+
3 rows in set (0.00 sec)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式