|
需求描述
linux 系统安装mysql后,需要通过外网来连接mysql
解决方案:
更改mysql相关配置,步骤如下:
1)配置文件中添加访问的ip
[mysqld]
bind-address = 0.0.0.0
2)mysql配置权限
- CREATE USER 'your_username'@'%' IDENTIFIED BY 'your_password'; #更改你的用户名与密码
- GRANT ALL PRIVILEGES ON *.* TO 'your_username'@'%' WITH GRANT OPTION;
- FLUSH PRIVILEGES;
复制代码
|
|