sudo mysql -u root
mysql> DROP USER 'root'@'localhost';
mysql> CREATE USER 'root'@'%' IDENTIFIED BY '';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
mysql> FLUSH PRIVILEGES;
mysql> exit
vi /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 127.0.0.1 を以下に変更する
bind-address = 0.0.0.0
systemctl restart mysql.service
コメント