阿里云下 centos7 xampp 数据库navicat远程连接(mysql错误10038)

阿里云下 centos7 xampp 数据库navicat远程连接

2018年07月08日 19:20:04 尘埃338 阅读数 484更多

分类专栏: linux centos服务器命令

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

本文链接:https://blog.csdn.net/heyuqing32/article/details/80961635

1:赋予 opt/lampp /mysql跟etc 文件夹 777 权限

重启 xampp ,如果下面显示的话就成功了

 

如果没有:

进入opt/lampp/bin

命令 ./mysql -uroot -p

输入数据库密码

进入数据库

输入命令

MariaDB [(none)]>  show global variables like 'port';

显示这种命令是失败的,因为默认端口应该是3306,而下面是0

 

修改etc目录跟 mysql数据库目录的权限

重启服务器

他就会报wearning 警告

XAMPP: Stopping Apache...ok.

XAMPP: Stopping MySQL...ok.

XAMPP: Stopping ProFTPD...ok.

XAMPP: Starting Apache...ok.

XAMPP: Starting MySQL...ok.

XAMPP: Starting ProFTPD...Warning: World-writable config file '/opt/lampp/etc/my.cnf' is ignored

ok.

[root@izwz9fdnemzvxc2cc3yofgz lampp]# Warning: World-writable config file '/opt/lampp/etc/my.cnf' is ignore

不理它的警告

进入数据库操作上面的命令

就会出现

 

然后就大功告成,

 

navicat能远程连接数据库了 

注意,阿里云要注意防火墙的3306端口是否开启, 跟控制台的安全防火墙tcp mysql 3306端口规则

telnet ip 3306

监听端口 netstat -ano | grep 3306

原文地址:https://www.cnblogs.com/smilevv/p/13260910.html