Question

Database Missing after Restore from Snapshot

Posted August 9, 2014 5.5k views

I needed to restore my droplet from a snapshot after a problem. But now my WordPress database seems to be inaccessible or missing. Doesn’t restore from snapshot restore all data and files?

1 comment
  • Log in as super user or use sudo
    Open /etc/mysql/my.cnf using gedit
    Find bind-address, and change its value to the database server host machine’s IP address. For me, it was localhost or 127.0.0.1
    Save and close the file.
    Come back to terminal and execute sudo service mysql start

    And it worked for me.

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.

4 answers

One cause might the change of the IP address. Check the mysql configuration file.

sudo nano /etc/mysql/my.cnf

Scroll down to “bind-address = ”, and update the IP number with the new IP of your droplet.

bind-address        = XX.XXX.XXX.XX

Save the changes of the file and do restart.

sudo service mysql restart

Hi,

Snapshots take a full system image. All files, including your MySql database, will be present when you restore from a snapshot.

Are you seeing error messages when you attempt to connect to the database? What is the output of:

mysqladmin -u root -p status

Is there anything in the error log? Run:

tail /var/log/mysql/error.log

hello, i have the same problem, resized from snapshot and nothing is working, no mail, no web, no ssh
i am very preoccupied

yes, i meet this error also. After restore a snapshot, i can not connect to any database. Whats wrong here?

Submit an Answer