(个人经验,仅供参考,错误之处,敬请谅解)
服务器mysql修改
1、创建可以连接的用户
使用root用户登陆后
create user ’ useraname’@’%’ identified by ‘password’;
grant all privileges on . to ‘username’@’%’ with grant option;
2、修改mysql配置文件
sudo vi(m) /etc/mysql/mysql.conf.d/mysqld.cnf
mysql 5.x 的配置文件
bind-adress:127.0.0.1 修改为 0.0.0.0
mysql 5.x版本 之前的配置文件 /etc/mysql/my.cnf
进行连接
使用navicat 或者其他连接工具
输入服务器地址,使用3306端口
输入设置好的用户名和密码
连接成功