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?
11 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 datadirThat'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.