MySQL Server and Server-Startup Programs

MySQLMySQLi Database

There are 4 MySQL server and server-start up programs. They have been listed below −

  • mysqld

  • mysqld_safe

  • mysql.server

  • mysqld_multi

mysqld

is also known as MySQL Server. It is a single multithreaded program that does most of the work in a MySQL installation. It doesn’t spawn additional processes. MySQL Server helps manage the access to the MySQL data directory which contains databases and tables. The data directory is the default location for other information like log files and status files.

When MySQL server starts, it listens to the network connections from client programs and helps manage the access to databases on behalf of these clients.

To see options specified at startup, the below command can be run −

shell> mysqld --verbose --help

mysqld_safe

The mysqld_safe is considered as the right way to start a mysqld server on Unix. It adds certain safety features like restarting the server when an error occurs and logging runtime information to an error log.

To start or stop the server manually with the help of mysql.server script, invoke it from the command line with start or stop arguments. It is shown below −

shell> mysql.server start
shell> mysql.server stop

mysql.server

The mysql.server will change the location to the MySQL installation directory. It will then invoke the mysqld_safe. To run the server as a specific user, an appropriate user option can be added to the [mysqld] group of the global /etc/my.cnf option file.

mysqld_multi

The mysqld_multi has been designed to manage several mysqld processes which listen for connections on different Unix socket files and TCP/IP ports. It can be used to start or stop servers, or report their current status.

It can be invoked using the below code −

shell> mysqld_multi [options] {start|stop|reload|report} [GNR[,GNR] ...]
raja
Published on 10-Mar-2021 12:10:09
Advertisements