Question

Can't Install MySQL on Dokku

Posted May 13, 2014 7.3k views
I've set up the droplet and when I run `dokku mysql:create www` I get: mkdir: cannot create directory ‘/home/git’: Permission denied I can't figure out how to get past this.

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
Hi Ben,

It looks like this is a bug in the MySql Dokku plugin, it hasn't been updated for recent versions of Dokku:

https://github.com/hughfletcher/dokku-mysql-plugin/pull/9

You can use this fork until it gets merged into master:


cd /var/lib/dokku/plugins
git clone https://github.com/k2nr/dokku-mysql-plugin.git mysql
chmod +x mysql/install mysql/commands
dokku plugins-install


You also need to make sure you have the most recent version of docker:


apt-get update
apt-get upgrade lxc-docker
  • Missing the mysql at the end of the second line of your first code block (so that git can load the repo into the mysql folder):

    git clone https://github.com/k2nr/dokku-mysql-plugin.git mysql
    
  • @yazin: Thanks, I’ve fixed the command.

  • When running these commands and attempting to create a new database with:

    dokku mysql:create foo
    

    I get this message back:

    mysqladmin: Unknown command: 'null'
    

    What’s going on here? Is anything being created?

  • I’m getting the same error as jdrake30. It prints out “Unknown command: ‘null’”, but the database seems to have been created (I can list it with mysql:info). I can link it as well.

    However, it’s Host field is empty. When trying to use it within a Sails.js app, we get connection refused errors. Replacing Host in our config file with 127.0.0.1 (instead of having it blank) doesn’t seem to help. Any clues?

Running into the same issue. I followed your directions above but I'm still getting a permission denied message.
Try running the commands as root. You can run sudo -s as a user with sudo privileges to log in as root.

I’m also getting the Unknown command: ‘null’ error even after upgrading docker and cloning the forked mysql plugin. I also tried the mariadb plugin, but that didn’t work too well either. So far it seems like everything is changing too fast for all the plugins to keep up :(

Submit an Answer