加入收藏 | 设为首页 | 会员中心 | 我要投稿 东莞站长网 (https://www.0769zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

MYSQL默认用户名ROOT修改方法

发布时间:2021-02-23 22:02:34 所属栏目:MySql教程 来源:网络整理
导读:感兴趣的小伙伴,下面一起跟随编程之家 jb51.cc的小编两巴掌来看看吧! 用root身份登入 进入mysql库 修改user表即可。 操作如下: G:phpStudyMySQLbinmysql -uroot -prootWelcome to the MySQL monitor. Commands end with ; or g.Your MySQL connection

感兴趣的小伙伴,下面一起跟随编程之家 52php.cn的小编两巴掌来看看吧!

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

操作如下:

G:phpStudyMySQLbin>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)


(编辑:东莞站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读