Restart Start Stop Mysqld From The Terminal in Linux

You could need to restart MySQL server after installing, upgrading, or making some changes in my.cnf file in Linux. The quickest way to this is by typing on the command line terminal. No fancy graphic interface.

MySQL Server Restart General Syntax

The syntax is as follows. On the Linux or OS X type the following on the shell prompt:
/etc/init.d/mysqld start
/etc/init.d/mysqld stop
/etc/init.d/mysqld restart

MySQL Server Restart Using Systemd Manager

Alternatively you could restart MySQL by sending control commands to the systemd manager.
systemctl start mysqld
systemctl stop mysqld
systemctl restart mysqld

FreeBSD Unix server users could use the following syntax to start/stop/restart the server.
/usr/local/etc/rc.d/mysql-server start
/usr/local/etc/rc.d/mysql-server stop
/usr/local/etc/rc.d/mysql-server restart

On OS X to start/stop/restart MySQL from the command line, as this article states
sudo /usr/local/mysql/support-files/mysql.server start
sudo /usr/local/mysql/support-files/mysql.server stop
sudo /usr/local/mysql/support-files/mysql.server restart

Diana D has written 19 articles

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>