Can't connect to mySQL server after the hacker

My site has been down over ten days now since the hacker did his damage. He wiped out several tables in my database. Right after it happened I was still able to get into the mySQL server using my macOS Querious app, but not anymore. I’m not sure what the hacker did to cause this subsequent change. I can successfully get in if I use the command line to SSH into the droplet, then login with a user on the mySQL server. But I just can’t accomplish this in the mySQL app.

I’ve been researching this for days on end with no success. Can someone point me to an article that would help me troubleshoot this problem? I do have an inbound rule in the Digital Ocean firewall for port 3306. I also have this port open in ufw.

Here is the error I’m getting in the Querious app:

mySQL connection failed Can’t connect to mySQL server on x.x.x.x (61) (2003) Double check the mySQL host and port settings are correct, the server is running, and that no firewall settings are blocking access to the server.

Thank you!!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Site Moderator
Site Moderator badge
July 16, 2023

Hi @spendlove,

There are a few possibilities, the best one would be to use a backup if you have one. If database tables have been removed it might be very hard if not impossible to restore the structure of the database and its contents.

If a backup is not an option, then you can try changing the password of the mysql user you are using and try again afterward.

Additionally, try to run

  1. telnet YourDropletIP 3306

from your laptop to see if you would be able to connect. If you do, then you have access to the port but the user and password are the problem. If you can’t connect then it’s your firewall.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel