无法远程连接mysql数据库
在阿里云租了个服务器(ubuntu环境),配置好了mysql数据库,可以增删改查,一切完好,但是在我本机远程连接这个mysql时,产生如下问题:
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
上网搜索解决办法:
将/etc/mysql/my.cnf配置文件加上:
[mysqld]
wait_timeout=31536000
interactive_timeout=31536000
保存
然后重启mysql
再在我的电脑上连接这个mysql,仍然出现这个问题(实例开启了3306端口(入规则),配置出规则了也没有用):
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
有没有大佬可以解决这个问题呢???