How to Restart MySQL/MariaDB Server on Linux and Unix Command Line

312
0

I want to restart my mysqld server after making some changes to my.cnf file. How do I restart mysql server from a command line on a Linux or Unix-like systems?

The syntax is as follows to start, stop, or restart the mysql server on a Linux or Unix-like systems. You must run the following command as per your Linux/Unix variant. You must be the root user to run the following commands.

CentOS/RHEL/Fedora/Scientific Linux version 4.x/5.x/6.x or older users

The syntax is:

CentOS/RHEL/Fedora/Scientific Linux version 7.x or newer users

The syntax is as follows to start mariadb/mysql server:

The syntax is as follows to stop mariadb/mysql server:

The syntax is as follows to restart mariadb/mysql szerver:

Debian/Ubuntu Linux users

The syntax is as follows to start/stop/restart mysql server:

FreeBSD Unix server user

To start the Mysql server type:

To restart the Mysql server type:

To stop the Mysql server type:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.