Failing to start MySQL inside GitHub Actions

Published under Devops.

I recently started running into this error on GitHub Actions out of the blue:

Failed to initialize, mysql service is unhealthy

It turns out, the MySQL docker image had been recently updated to no longer support setting the MYSQL_USER environment variable to root, since there is already a root user created by default.

To get around this issue, all you have to do is choose a different name for your MYSQL_USER:

For reference, this is how I had it setup prior to the change:


Thanks for reading!

Did you find this post useful? Let me know on Twitter! If you found an issue with the content, submit a pull request!

Subscribe to my newsletter to know when I publish more content in the future.

❤️ Likes: 0
📣 Retweets: 0
💬 Replies: 0
🙊 Mentions: 0