Following this tutorial, I'm getting

# sudo service mysqld start

Failed to start mysqld.service: Unit mysqld.service failed to load: No such file or directory.

2 Answers 2


The mysql daemon in Ubuntu is packaged as mysql, not mysqld.

sudo service mysql start

That's really all there is to that one.

  • 5
    Unless it does not work Jun 23, 2016 at 21:17
  • After a reboot it works for me, strange to speak about reboot in Linux, maybe a PATH problem ?
    – NicoMinsk
    Jul 25, 2016 at 15:41

WARNING: This solution will destroy any DB data you have. DO NOT use it if you have DB data you intend to keep!

I got stuck with the same issue and I uninstalled and installed again by following the following commands:

  1. sudo apt-get --purge remove mysql-server mysql-common mysql-client.

  2. sudo apt update && sudo apt dist-upgrade && sudo apt autoremove.

  3. sudo apt-get install -y mysql-server mysql-client.

  • 1
    What about the data existing in current mysql?
    – CS_noob
    Nov 26, 2019 at 14:10
  • Instead of removing just run this sudo apt-get install -y mysql-server mysql-client
    – AKKAweb
    Apr 13, 2020 at 20:18
  • this is actually very dangerous, it will destroy your database. Mar 23 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.