注意EXIT仅仅断开了客户端和服务器的连接,MySQL服务器仍然继续运行
Topic source兄弟,你也可以了。windows的mysql自带一个Notifier,可以启动,关闭mysqld服务。Linux中,如果是yum安装的,直接使用service mysqld stop/start 关闭服务。 使用 ps aux |grep mysqld 查看mysql进程是否关闭,也可以pstree -p|grep mysqld 查看进程。
linux:中,如果是自己源码包安装的,那就去安装路径里面找myslqld ,绝对路径 比如 /usr/local/mysql/bin/mysqld stop/start
you can use one of the following methods:
- From the Start menu, type Services and open it. From the list of services, locate the MySQL service and then right-click on it. From the drop-down menu, choose Stop. Alternatively, you can simply highlight the MySQL service and click the Stop button on the left-hand side¹².
- From a command prompt window, type `net stop mysql` and press Enter. This will stop the MySQL service if it is running³.
- If you have installed MySQL using an installer package, you can use MySQL Installer to stop the MySQL service. Launch MySQL Installer and click Server Instances on the home page. Select your server instance and click Stop Service in the Actions column³.
If you want to learn more about how mysql server works and how to start or restart it, you can refer to ³⁴⁵, which have detailed and technical documentation.
源: 0(1) Error: MySQL Shutdown Unexpectedly? Here’s how to fix - Appuals. https://appuals.com/error-mysql-shutdown-unexpectedly/ 访问时间 2023/3/10.
(2) Start MySQL Server on Windows 11 - TestingDocs.com. https://www.testingdocs.com/start-mysql-server-on-windows-11/ 访问时间 2023/3/10.
(3) MySQL :: Starting and Stopping MySQL :: 3 The Server Shutdown Process. https://dev.mysql.com/doc/mysql-startstop-excerpt/8.0/en/server-shutdown.html 访问时间 2023/3/10.
(4) MySQL :: Starting and Stopping MySQL. https://dev.mysql.com/doc/mysql-startstop-excerpt/5.7/en/ 访问时间 2023/3/10.
(5) MySQL :: MySQL 8.0 Reference Manual :: 5.1.19 The Server Shutdown Process. https://dev.mysql.com/doc/refman/8.0/en/server-shutdown.html 访问时间 2023/3/10.
- 1
醉后诀
当我发现这句话时,距离我安装mysql已半年有余~ 还是学廖老师的python课程时候装的,心疼我电脑的性能。。