Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
95
rated 0 times [  95] [ 0]  / answers: 1 / hits: 234247  / 1 Year ago, sat, april 8, 2023, 6:45:41

I have two VPS servers, and both have MySQL installed, one for testing and one for development. One of my servers won't let me connect from outside. With the user;




'mytestuser'@'%'




According to an open port finder, port 3306 for the offending server appears to be closed. I have C++ and Java programs of my own listening on arbitrary ports without any issues. Why is this happening and how can I fix it?



Ubuntu installed is Ubuntu 11.10 (GNU/Linux 2.6.32-042stab072.10 x86_64)



Results of netstat -tuple on each server



Offending server



tcp        0      0 localhost.lo:submission *:*                     LISTEN      root       39967664    -


Working server



tcp        0      0 *:mysql                 *:*                     LISTEN      mysql      1847519288  -

More From » server

 Answers
1

The problem was that the server was listening internally only.



Removing the line bind-address 127.0.0.1 from /etc/mysql/my.cnf solved the issue.



Newer versions of Ubuntu (≥16.04) may have this line in /etc/mysql/mysql.conf.d/mysqld.cnf.


[#32051] Sunday, April 9, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
diffeah

Total Points: 78
Total Questions: 130
Total Answers: 98

Location: Peru
Member since Fri, Oct 14, 2022
2 Years ago
;