【开源中国 APP 全新上线】“动弹” 回归、集成大模型对话、畅读技术报告”
远程环境 ubuntu 12.04 mysql 5.5.40
已经修改了账号可以远程远程访问 user表的host 改成了 %
用mysql front 连接的时候显示的不能连接到数据库
可以ping通 mysql所在的主机,用代码连接的时候显示一下报错信息:
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)] with root cause
java.net.ConnectException: Connection refused: connect
有人知道怎么解决么?
java.net.ConnectException: Connection refused: connect
又google了下,发现问题出现mysql的配置文件my.cnf中
sudo vim /etc/mysql/my.cnf
//找到如下内容,并注释
bind-address = 127.0.0.1 注释掉 bind-address = 127.0.0.1 后重启mysql就好了
加上0.0.0.0 ok了