How to stop and start MySQL server

To Stop MySQL Server

#sudo mysqld stop #service mysql stop #/etc/init.d/mysql stop #sudo service mysql stop #sudo /etc/init.d/mysql stop #/usr/local/mysql/bin/mysqladmin -u root -p shutdown

To Start MySQL Server

#sudo mysqld start # service mysql start # /etc/init.d/mysql start# # sudo service mysql start # sudo /etc/init.d/mysql start

To restart MySQL Server without running stop and start, use:

#sudo service mysql restart #sudo /etc/init.d/mysql restart

If any failures occurred in start or stop process of MySQL Server, check error information in error.log file.

root@ubuntu:/var/log/mysql# ls -ltrh total 36K -rw-r----- 1 mysql adm 1.8K Sep 9 20:25 error.log.7.gz -rw-r----- 1 mysql adm 256 Sep 10 05:20 error.log.6.gz -rw-r----- 1 mysql adm 286 Sep 11 01:18 error.log.5.gz -rw-r----- 1 mysql adm 347 Sep 12 05:54 error.log.4.gz -rw-r----- 1 mysql adm 2.5K Sep 13 19:18 error.log.3.gz -rw-r----- 1 mysql adm 285 Sep 14 03:23 error.log.2.gz -rw-r----- 1 mysql adm 4.8K Sep 15 02:22 error.log.1.gz -rw-r----- 1 mysql adm 2.1K Sep 15 21:11 error.log root@ubuntu:/var/log/mysql#

Related Posts

Responses are currently closed, but you can trackback from your own site.

Comments are closed.

Powered by k2schools
%d bloggers like this: