MYSQL默认用户名ROOT修改方法

前端之家收集整理的这篇文章主要介绍了MYSQL默认用户名ROOT修改方法前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
感兴趣的小伙伴,下面一起跟随编程之家 jb51.cc的小编两巴掌来看看吧!

用root身份登入 进入MysqL修改user表即可。

操作如下:

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)


猜你在找的MySQL相关文章