MySQL Forums
Forum List  »  Newbie

Failed to Connect to MySQL ... Unable to connect to localhost
Posted by: Taras Zagajewski
Date: May 01, 2022 05:00AM

Hey everyone,

I've been learning Ubuntu Server along with MySQL as well as a bunch of other server software over the last few months and have been pretty good at debugging until now.

I recently followed an online guide to install a piece of software dependant on a database (like most server software these days), and I blindly copied a line which installed MariaDB. I already had MySQL running my Wordpress sites. It overwrote my database but I managed to restore it from a dump MariaDB kindly did prior to installing. I did this by copying the dump to a 'safe space', and uninstalling and reinstalling using apt-get.

To cut to the chase, my Wordpress sites are back up since the reinstall (they run using 127.0.0.1), however my Docker containers are not able to communicate to the server, which is over the local IP. I tried to login with MySQL Workbench from a PC on the network and now get the error "Failed to Connect to MySQL at 192.168.0.30:3306 with user ___" (insert username), then the sub-message "Unable to connect to localhost" - that's the kicker.

My bind-address in the config is set to 0.0.0.0 and my firewall on the Ubuntu server is temporarily disabled.

Thanks for reading so far, and let me know if any of you can help!

Options: ReplyQuote


Subject
Written By
Posted
Failed to Connect to MySQL ... Unable to connect to localhost
May 01, 2022 05:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.