======================================================
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
======================================================