mysql show databases not showing databases that are in /opt/bitnami/mysql/data directory

I have an ebs-backed ec2 ubuntu server which is running but unreachable.

There are very stupidly no recent backups.

I made a snapshot of the block, created a volume, spun up a new instance, attached the new volume. I see all the data from my site in the /opt/bitnami/mysql/data directory, but when I go into the mysql console, it shows only information_schema and test when I type show databases;.

How can I 'point' mysql to the correct folder?

1

1 Answer

Without knowing your setup its really hard to say but I see two possibilities:

  • Fist check permissions, and make sure that the files and folders under mysql/data belong to mysql:mysql
  • Next cat /etc/mysql/my.cnf | grep datadir That's where mysql is looking for your files. You can either copy the files there or change that line in /etc/mysql/my.cnf. Make sure to turn off mysql before you go messin' with the data files.
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like