允许远程操作
cd /etc/mysql/mysql.conf.d sudo vi mysqld.cnf
找到bind-address一句,并注释。
进入管理端
#123456是安装时候设置的密码 mysql -uroot -p123456
输入命令:
# 授权 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION; # 刷新 flush privileges; # 退出 exit
重启MySQL
service mysql restart