具体方法如下:
修改密码:
MySQL -u root -p
Enter password:***
mysql>use mysql; 选择数据库
Database changed
mysql> UPDATE user SET password=PASSWORD("新密码") WHERE user='你的用户名';
mysql> FLUSH PRIVILEGES;
mysql> quit;
修改用户名:
mysql -u root -p Enter password:*** mysql> use mysql; 选择数据库 Database changed mysql> update user set user="新用户名" where user="root"; 将用户名为root的改为新用户名 mysql> flush privileges; 刷新权限 mysql> exit
