当前位置:Gxlcms > 数据库问题 > linux下mysql允许远程连接

linux下mysql允许远程连接

时间:2021-07-01 10:21:17 帮助过:20人阅读

2. 查看linux防火墙是否开放3306端口

技术分享图片

3. 添加防火墙例外

技术分享图片

4. 重启防火墙

 技术分享图片

5. 创建远程连接用户并授权

 mysql> select host,user,password from mysql.user;

 技术分享图片

创建用户

create user test identified by 123456;

技术分享图片

授权

grant all privileges on *.* to test@%identified by 123456 with grant option;
flush privileges;

修改用户密码

update mysql.user set password=password(新密码) where User="test" and Host="localhost";

删除用户

delete from user where User=test and Host=localhost;

 

linux下mysql允许远程连接

标签:创建用户   strong   mys   授权   man   http   mysql   and   pre   

人气教程排行