当前位置:Gxlcms > 数据库问题 > 远程连接MySQL

远程连接MySQL

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

1、导出SQL脚本

技术图片

2、上传到Linux

3、创建数据库

4、运行SQL脚本

方式(1):在本地使用工具

技术图片

方式(2):在Linux上,进入创建好的数据库test,然后source /usr/mysql/yoursql.sql;运行脚本

5、远程连接

(1)没有授权时,无法连接,解决方法如下

授权给你的ip:grant all PRIVILEGES on recruit_students.* to root@‘ip‘ identified by ‘123456‘;

提交事务:commit;

刷新:flush privileges;

(2)没有关闭防火墙时,无法连接,解决方法如下

systemctl stop firewalld.service

(3)远程连接

技术图片

远程连接MySQL

标签:防火   数据   mct   mysql   img   使用   远程连接mysql   png   ima   

人气教程排行