MySql container stuck at "Restarting..." on Dokku

January 13, 2016 1.3k views
Dokku MySQL Ubuntu

Today I tried to create a new mySql database on my Dokku container using

dokku mysql:create bookmarks

The container has been created, but it seems it is unable to start.
The command

dokku mysql:list

always shows

bookmarks          mysql:5.6.26  restarting  -              -

I am unable to stop, restart or destroy this DB.

dokku mysql:destroy bookmarks
 !     WARNING: Potentially Destructive Action
 !     This command will destroy bookmarks MySQL service.
 !     To proceed, type "bookmarks"

> bookmarks
-----> Deleting bookmarks
       Deleting container data
 !     Service is already stopped
       Removing container
Error response from daemon: Conflict, You cannot remove a running container. Stop the container before attempting removal or use -f
Error: failed to remove containers: [dokku.mysql.bookmarks]

I also tried to reboot the entire droplet, without any success.
Can anyone help me solving this problem?
Thank you in advance,

1 Answer

So, finally with the help from people from DigitalOcean I've been able to stop and destroy that faulty container.

Here is what I did:

Check Docker processes running
docker ps -a

Identify the process that is causing the problem, in my case it was:
8549c8ec4e53 mysql:5.6.26 "/entrypoint.sh mysql" 17 hours ago Restarting (1) 2 hours ago 3306/tcp dokku.mysql.bookmarks

Kill the Docker process
docker kill 8549c8ec4e53

Remove the container from Dokku
dokku mysql:destroy bookmarks

Hope this answer helps others having similar problems.

Have another answer? Share your knowledge.