Select Page

7 reasons why you get ‘mysql failed to start’ errors and how we fix them

7 reasons why you get ‘mysql failed to start’ errors and how we fix them

[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed

Many a times, you’d have come across this message in your server while trying to restart the database server.

Our Dedicated Server Admins support the server infrastructure of several web hosting companies, and this is a common issue we’ve seen in many Linux servers.

Here, we’ll see the common causes and solutions for ‘Mysql failed to start’ issues.

Click here to protect your web & database services from downtime.


Reasons for ‘Mysql failed to start’ error in your servers

There are a number of issues that can lead to MySQL errors, the most prominent reasons we’ve seen are:

  1. Errors in configuration – MySQL stores its configuration settings in ‘/etc/my.cnf’ file. Any errors or unsupported parameters in this config file can prevent the server from starting.
  2. Corrupt MySQL binary – When MySQL binary or tables gets corrupt, it can cause the MySQL server to fail or not start.
  3. Permissions/ownership of binaries and folders – At times, the ownership and permissions of the MySQL files such as binaries, logs or even the entire ‘/var/lib/mysql’ folder can get accidentally changed, which can lead to errors while starting the service.
  4. MySQL port already in use – If some other process is running in the MySQL port (default 3306), MySQL would be unable to bind to the port and cannot run.
  5. Unable to write to /tmp – If the /tmp directory is not writable due to permission issues or lack of space, MYSQL cannot write the needed files and cannot start.
  6. Lack of disk space – Another cause for MySQL failures is lack of adequate disk space in the server, which can be verified using ‘df -h’ command.
  7. Out of memory – If MySQL process is not getting enough memory due to abusive processes or any other valid process, it cannot start or would keep crashing all the time.

You don’t have to lose your sleep to keep your customers happy. Our friendly Hosting Support Specialists are online 24/7/365 to help your customers. ]


How we resolve MySQL failures in servers

  1. Fixing the permissions/ownership – We make sure that MySQL server can access the data directory. The ownership and permissions of the data directory are set such that the mysql user can read and modify them.
  2. Allocating enough disk space – If the disk space in the server is not enough, we resolve it by removing unnecessary files and folders or moving data to different partitions.
  3. Examining the error logs – MySQL stores its errors in ‘hostname.err’ and ‘hostname.log’ files. By detailed examination of these log files, we are able to pinpoint and resolve the issues.
  4. Correcting the configuration errors – Any errors in the configuration file my.cnf or table corruptions are immediately pin-pointed and resolved.
  5. Adding more swap memory – If the service failure is due to lack of adequate memory, we resolve that issue by increasing the swap memory allocated to the server.
  6. Reinstalling the server – In cases where the MySQL binary is corrupt or installation is incomplete, we reinstall the server and get the service functional.

[ Use your time to build your business. We’ll take care of your servers. Hire Our Hosting Support Specialists and boost your server performance. ]


At Bobcares, our 24/7 server specialists constantly monitor all the services in the server and proactively audit the server for any errors or corruption in them.

This enables us to prevent a service downtime for our customers who are web hosts. By following a systematic debugging approach for service failures, we have been able to minimize the downtime involved.

If you would like to know how to avoid downtime for your customers due to service failures, we would be happy to talk to you.



Never again lose customers to poor service! Sign Up once. Enjoy Peace Of Mind For Ever!



  1. Hi there.
    On fail to start Mysql .
    Just went back to network interfaces using config:

    auto lo
    iface lo inet loopback

    auto etho0
    iface eth0 inet dhcp

    and mysql at rebooting seems to work again.

    I am trying to set up a ecommerce store on an old ubuntu 8.04 server.

    Trying to install the store I get errors stating that its not possible to connect through some sockets.

    I have moved the interfaces in order to achieve the installation from a lap top.

    I still dont see what is the problem, but its a good idea to publish this finding.

    • still trying to connect two machines.
      I saw that turning off the loopback mode in the interfaces makes the mysql to fail.


Submit a Comment

Your email address will not be published. Required fields are marked *

Bobcares is a server management company that helps businesses deliver uninterrupted and secure online services. Our engineers manage close to 51,500 servers that include virtualized servers, cloud infrastructure, physical server clusters, and more.