Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

mysqld is the MySQL Server daemon: the server-side program that manages databases, accepts client connections and handles database requests. It is different from mysql, the command-line client commonly used to connect to a server and interact with it.

What does mysqld do?

Oracle describes mysqld, also known as MySQL Server, as a single multithreaded program that does most of the work in a MySQL installation. It manages the server’s data directory, including databases and tables, listens for client connections, and coordinates access to database data. The official overview is in MySQL’s mysqld documentation.

When an application or a person using a client sends a database request, the server process handles it. If mysqld is stopped, clients generally cannot use that server to run queries until it is started again.

What is the difference between mysql and mysqld?

Program Role Typical use
mysqld MySQL Server process Runs the server, manages its data and handles client requests.
mysql MySQL command-line client Connects to a MySQL server so a user can issue commands and queries.

The names are similar, but they refer to different parts of a client-server setup: mysqld provides the database service; mysql is one way to use that service.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why is mysqld running?

If MySQL is installed and configured to start automatically, its service manager may launch mysqld during system startup. A running process is expected when a local application or remote client needs that MySQL server. To check its service state on a systemd-based Linux distribution, use systemctl status mysqld; some Debian-based packages use the service name mysql instead.

If you do not recognize the process, check which package installed it and which service owns it before stopping or removing anything. Other software on the machine may depend on the database.

How do you start, stop or restart mysqld on Linux?

On Linux systems that use systemd, manage MySQL through the service manager rather than launching the server process manually:

  1. Check the service name used by your package. Common names are mysqld and, on some Debian-based packages, mysql.
  2. Start it with sudo systemctl start mysqld, or substitute mysql if that is your service name.
  3. Stop it with sudo systemctl stop mysqld, or the applicable service name.
  4. Restart it with sudo systemctl restart mysqld, or the applicable service name.
  5. Check the result with systemctl status mysqld, substituting the service name where necessary.

These commands apply to systemd-managed services. Other platforms and installations can use different mechanisms, including Windows services, mysql.server, mysqld_safe, launchd on macOS, or Solaris Service Management Facility (SMF). Use the method documented for the operating system and package in question; service names, configuration locations and log access vary.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How is mysqld configured?

Server startup options can be supplied directly on the command line or read from option files. MySQL system variables affect server operation; some can be changed while the server is running. Status variables expose information about its current activity. The available options and variables depend on the MySQL version and configuration.

To see the server’s available startup options, run mysqld --verbose --help in an environment where the MySQL server program is installed. This displays help information; it is not a substitute for checking the options and configuration files used by the service that actually starts your server.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What should you check if mysqld will not start?

  • Read the server error log. It often contains the reason startup failed; how to locate it depends on the platform and installation.
  • Verify the configured data directory. Confirm that the server is pointed at the intended directory and that it exists.
  • Check permissions. The account running the service needs appropriate access to the data directory. Follow your platform’s MySQL administration guidance rather than changing ownership or permissions blindly.
  • Confirm the service name and manager. A command can fail simply because the package uses mysql rather than mysqld, or because the system does not use systemd.

After correcting a configuration or permissions problem, try starting the service again and check its status and error log for the outcome.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.