1、用root身份登bai入 进入mysql库du 修改zhiuser表即可。
2、操dao作如下:
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=‘lds’ where user=‘root’;
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
然后就把用户名给改了
改了之后别二了吧唧还用root登录记得换,我就是那个二了吧唧的人.
以上转载自 https://zhidao.baidu.com/question/685816812791774932.html
3.补充一下怎么登录mysql(不同用户)
首先保证你的环境变量和用户变量都配置了MySQL的bin目录
然后win+r cmd
其实就是你用什么用户登录 -u后面就写什么 密码对应起来.
相关文章: