Warning: session_start(): open(/var/cpanel/php/sessions/alt-php74/sess_a55bb05e98c34a40be15199370eeed81, O_RDWR) failed: No such file or directory (2) in /home/xsofthost/public_html/help/wp-content/plugins/accelerated-mobile-pages/includes/redirect.php on line 358

Warning: session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/alt-php74) in /home/xsofthost/public_html/help/wp-content/plugins/accelerated-mobile-pages/includes/redirect.php on line 358
How to Restart MySQL Service Using Linux Shell Command Line - XsoftHost

How to Restart MySQL Service Using Linux Shell Command Line

Why you need to Restart SSH Service

Sometimes you may need to change some configurations inside MySQL configuration file my.cnf , so after you made or modify the MySQL cnf file ,properly you need to Stop and Start or Restart MySQL Service.

How To  Restart MySQL Service under Linux / UNIX

The following examples using the restart command in case you want to stop the service you can use stop command and use start command to start stopped service.

You have run these command under root/administrator privileges .

Restart MySQL Service On CentOS/RHEL/Fedora/Scientific Linux version 4.x/5.x/6.x

service mysqld restart
Or
/etc/init.d/mysqld restart

Restart MySQL on CentOS/RHEL/Fedora/Scientific Linux version 7.x

systemctl restart mysqld

Restart MySQL on Debian/Ubuntu Linux

/etc/init.d/mysql restart
Or
service mysql restart

Restart MySQL On FreeBSD Unix

/usr/local/etc/rc.d/mysql-server start
Share on facebook
Share on twitter
Share on linkedin
Share on telegram
Share on whatsapp

Related Posts