Forum archive
MySQL Workbench connection problem
Hello,
I am attempting to, using MySQL Workbench, connect to MySQL, using username "garyroot".
I executed the following:
1. I have MySQL user "garyroot" set up with "Any" under "Hosts" (see attached screenshot, "MySQL_Users.png")
2. I made sure that the "MySQL server listening address" is set to "Any" (see attached screenshot, "MySQL_Server.png")
3. I then rebooted the entire appliance.
However, the error returned is "Can't connect to MySQL server (10061)".
Two other points -
a. I ran "netstat -tunlp" at the appliance's terminal, and the output has only one entry for port 3306 (see attached screenshot, "Netstat.png"). Am I correct that "netstat" is telling me that MySQL is not listening for connections on port 3306 other than from localhost? If so, it would appear that perhaps #2 did not have any effect?
b. Is it a question of also setting up a firewall rule of some sort in the "Linux Firewall" section of the appliance?
Thanks in advance for any suggestions!
I can't see your screenshots unfortunately. But it sounds like you are on the right track, but I'm not sure why it isn't working for you?!
To clarify and confirm, only the standalone "MySQL" appliance itself is pre-configured to allow remote connections. All other appliances that include MySQL (technically MariaDB these days) are bound to localhost.
Personally, I'm a commandline user and I assume from your post you are using Webmin. In essence there are 3 steps required:
There is actually a doc page that explicitly notes how to do this, although it needs checking/updating to ensure that it's still relevant to v15.x. As something of an aside (as I note you are using a separate user) in v15.x appliances, without further config changes, root can ONLY connect from localhost (uses unix socket so no password required). FWIW that's why we create an additional (root like) "Adminer" MySQL user. I can't be sure, but I suspect that if you use those instructions and swap out your "garyroot" user where that says "root", it should still work.
Assuming that you are running your server locally, the firewall should not be giving you any grief. TurnKey ships with firewall rules configured, but the firewall itself is not enabled by default (which we will likely change at some point in the future).
TurnKey appliances on AWS (either via the Hub or AWSMP) provide default security group settings that match the default firewall rules.