kbhardwaj
By:
kbhardwaj

Upgrading Dokku caused me to lose mysql db service

February 4, 2016 1.1k views
Dokku MySQL

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?

3 comments
  • 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.

  • 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

  • @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
    
1 Answer

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

Have another answer? Share your knowledge.