Get the App
SLTechnology News&Howtos  ›  Database  › 

What are the commands for starting, stopping, and restarting MySQL under various operating systems

Shulou Source: shulou.com Published: 2022-05-31 12:54:39 10月04日 Update

In this issue, Xiaobian will bring you about how to start, stop and restart MySQL commands under various operating systems. The article is rich in content and analyzes and narrates from a professional perspective. After reading this article, I hope you can gain something.

Linux How to start/stop/restart MySQL database service? There are two ways, one is to start/stop/restart using service, the other is to start/stop/restart using mysqld script.

Linux Start MySQL Command

[root@yunwei ~]# service mysqld start

//start mysql with service

[root@yunwei ~]# /etc/inint.d/mysqld start

//start mysqld with script

The command to start MySQL database server in the above two ways, choose one of them

Linux Stop MySQL Command

[root@yunwei ~]# service mysqld stop

//stop mysql using service

[root@yunwei ~]# /etc/inint.d/mysqld stop

//use script to stop mysqld

The above two ways to stop MySQL database server commands, choose one of them;

Linux restart MySQL command

[root@yunwei ~]# service mysqld restart

//restart mysql using service

[root@yunwei ~]# /etc/init.d/mysqld restart

//restart mysqld using script

Restart of mysql service under various operating systems

RedHat Linux systems:

1. Start: /etc/init.d/ mysqld start

2./etc/init.d/ mysqld stop

3. Restart: /etc/init.d/ mysqld restart

Ubuntu Linux System:

1. Start: /etc/init.d/ mysql start

2./etc/init.d/ mysql stop

3./etc/init.d/ mysql restart

Windows systems:

1.cmd

2. Start: net start mysql

3. Stop: net stop mysql

The above is what the commands to start, stop and restart MySQL under various operating systems shared by Xiaobian are. If there is a similar doubt, please refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.

Tags: Commands systems scripts services operating systems data databases methods content servers analysis professional small and medium rich in content that is articles more knowledge articles industries Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Apple Redmi Xiaomi Microsoft