Search code examples
mysqlraspbianraspberry-pi3

Can't connect to MySQL Server on "mydomain.tld" (10060)


I cannot seem to establish a MySQL Workbench connection to my Raspberry Pi 3 on a Raspbian based OS. I have a dynamic IP-Adress, that is why I am using a dynamic dns service by no-ip.com. My webserver and FTP server are working perfectly. The web server even successfully tried to reach out to the mysql server to find a user when using the login system. The only problem I have is that I cannot connect to the database using MySQL Workbench on any user. Root and the newly created user cannot connect to it.

I tried editing the my.cnf file in /etc/mysql/ uncommenting the bind-address or even setting it to 0.0.0.0 and then reloading and restarting the MySQL service. But it does not seem to work. enter image description here

The error message is Cannot connect to 127.0.0.1:3306

Edit: The Raspberry Pi 3 and I are both on the same network.

Edit 2: So I have installed PhpMyAdmin after 1 hour since I asked my question, and PhpMyAdmin is working perfectly. I don't know if this is MySQL Workbench fault or not, but I will leave the question open. I guess I will be using PhpMyAdmin instead..


Solution

  • The problem ultimately ended up being that MySQL was not seeing the hostname properly and was rejecting connections based on this. It was verified to work by allowing connections from any host. Advised to lock it back down to the connecting host.