Can't Install MySQL on Dokku

May 13, 2014 7.1k 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.
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:

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

cd /var/lib/dokku/plugins
git clone 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 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 (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 still getting the same permission denied error, is there any workaround this besides switching to postgresql?

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 :(

Have another answer? Share your knowledge.