Question

Upgrading Dokku caused me to lose mysql db service

I upgraded dokku from the 3 series to 4. After upgrading my mysql db service is missing. Did I lose all the data from that database, or is there some way I can access it on my system?

Subscribe
Share

Try looking in the datadir of your installation to see if your database files are still there

ls `my_print_defaults --mysql | grep datadir | sed -e 's/--datadir=//'`
## or try the standard location on ubuntu
ls /var/lib/mysql

If you see subdirectories for your apps, then your database may not be a total loss.

@kbhardwaj - First, make sure that your current mysql installation is accessible:

service mysql status   ### should display  that it is running
mysqlshow -u root -p  ### enter dbroot pw,  displays current databases if mysql is running

If the first command above failed, then you may need to check your packages

dpkg -l | grep mysql
## make sure you have a mysql-server package and note the version
dpkg --status mysql-server-YOURVERSIONHERE

I do have subdirectories there:

    ibdata1  
    ib_logfile0  
    ib_logfile1  
    mysql  
    mysql_upgrade_info  
    performance_schema

There are a lot of subdirectories under mysql as well. I’m going to check all these out now. Any tips on which files to look in? Thanks for your help


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

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.

This question was answered by @gndo:

@kbhardwaj - First, make sure that your current mysql installation is accessible:

service mysql status   ### should display  that it is running
mysqlshow -u root -p  ### enter dbroot pw,  displays current databases if mysql is running

If the first command above failed, then you may need to check your packages

dpkg -l | grep mysql
## make sure you have a mysql-server package and note the version
dpkg --status mysql-server-YOURVERSIONHERE

View the original comment