MyQL修改用户名命令、密码

时间:2022-12-05 23:55:12

======================================================

update user set host = '%' where user = 'root';

grant all on *.* to root@'%'

FLUSH PRIVILEGES

vim /etc/mysql/mysql.conf.d/mysqld.cnf

bind-address           = 127.0.0.1  注释掉这一行

======================================================

ubuntu切换root:

sudo -i

======================================================