Linux下MySQL的启动与停止
1.查看MySQL服务状态:
[root@localhost etc]# /etc/init.d/mysqld status
2.启动MySQL服务
--1.使用 linux 命令 service 启动:
[root@localhost etc]# service mysqld start
--2.使用 mysqld 脚本启动:
[root@localhost etc]# /etc/init.d/mysqld start
--3.使用 safe_mysqld 启动:
[root@localhost bin]# mysqld_safe &
3.停止MySQL服务
--1.使用 linux 命令 service 停止:
[root@localhost etc]# service mysqld stop
--2.使用 mysqld 脚本停止:
[root@localhost etc]# /etc/init.d/mysqld stop
--3.使用 mysqladmin 停止:
[root@localhost bin]# mysqladmin -uroot -p shutdown
4.重启MySQL服务
--1.使用 linux 命令 service 重启:
[root@localhost etc]# service mysqld restart
--2.使用 mysqld 脚本重启:
[root@localhost etc]# /etc/init.d/mysqld restart
5.Linux查看 mysql 安装路径
--1.查看文件安装路径:由于软件安装的地方不止一个地方,所有先说查看文件安装的所有路径(地址)。
--这里以mysql为例。比如说我安装了mysql,但是不知道文件都安装在哪些地方、放在哪些文件夹里,可以用下面的命令查看所有的文件路径。在终端输入:
[root@localhost etc]# whereis mysql
--2.查询运行文件所在路径(文件夹地址)
--如果你只要查询文件的运行文件所在地址,直接用下面的命令就可以了(还是以mysql为例)。终端显示:
[root@localhost bin]# which mysql
6.参照:
https://blog.csdn.net/hety119/article/details/85776742
https://blog.csdn.net/jabin8/article/details/83594841
https://blog.csdn.net/cx136295988/article/details/76690722
--安装路径:https://www.cnblogs.com/shihaiming/p/6038307.html
Windows下MySQL的启动与停止
https://www.cnblogs.com/tongxinling/p/7851224.html
https://www.cnblogs.com/jpfss/p/8016283.html