这点问题折腾一晚上,进入mysql,执行下面代码后 更改mysqld文件的绑定端口后重启数据库
mysql -u用户名 -p密码;
use mysql;
create user 'root'@'%' identified by '(redacted)'; grant all privileges on *.* to 'root'@'%' with grant option; flush privileges;
之后更改MYSQL绑定地址
vim /etc/mysql/mysql.conf.d/mysqld.cnf
sudo systemctl restart mysql