mysql 远程连接
我的版本是 mysql 5.7 ubuntu16.04.1 设置远程链接 阿里云 注释掉在注释掉在/etc/mysql/mysql.conf.d/mysqld.cnf里面的bind-address = 127.0.0.1里面的bind-address = 127.0.0.1 先给权限 chmod 721 /etc/mysql/mysql.conf.d/mysqld.cnf 再用vi 打开注释掉 # bind-address = 127.0.0.1 如果还有问题 mysql -u root -p 输入密码 show databases; 记得加封号 use mysql; Grant all on *.* to 'root'@'%' identified by 'root用户的密码' with grant option; flush privileges;
最后重启一下mysql
/etc/init.d/mysql restart or
service mysql restart