linux如何启动/停止/重启MySQL数据库服务?两种方式,一种是使用service启动/停止/重启,另一种则是使用mysqld脚本启动/停止/重启。
linux启动MySQL命令
- [root@yunwei ~]# service mysqld start
- //使用 service 启动 mysql
- [root@yunwei ~]# /etc/inint.d/mysqld start
- //使用脚本启动 mysqld
1 2 3 4 5 |
[root@yunwei ~]# service mysqld start //使用 service 启动 mysql [root@yunwei ~]# /etc/inint.d/mysqld start //使用脚本启动 mysqld |
上述两种方式启动MySQL数据库服务器的命令,二选一即可;
linux停止MySQL命令
- [root@yunwei ~]# service mysqld stop
- //使用 service 停止 mysql
- [root@yunwei ~]# /etc/inint.d/mysqld stop
- //使用脚本停止 mysqld
1 2 3 4 5 |
[root@yunwei ~]# service mysqld stop //使用 service 停止 mysql [root@yunwei ~]# /etc/inint.d/mysqld stop //使用脚本停止 mysqld |
上述两种方式停止MySQL数据库服务器的命令,二选一即可;
linux重启MySQL命令
- [root@yunwei ~]# service mysqld restart
- //使用 service 重启 mysql
- [root@yunwei ~]# /etc/init.d/mysqld restart
- //使用脚本重启 mysqld
1 2 3 4 5 |
[root@yunwei ~]# service mysqld restart //使用 service 重启 mysql [root@yunwei ~]# /etc/init.d/mysqld restart //使用脚本重启 mysqld |
上述两种方式重启MySQL数据库服务器的命令,二选一即可;