第三章 windows下啟動停止服務
阿新 • • 發佈:2022-03-01
一、查詢服務
單擊開始,找到命令提示符,右擊以管理員身份執行
C:\WINDOWS\system32>sc query mysql80 SERVICE_NAME: mysql80 TYPE : 10 WIN32_OWN_PROCESS STATE : 4 RUNNING (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0
二、停止服務
C:\WINDOWS\system32>net stop mysql80
MySQL80 服務正在停止.
MySQL80 服務已成功停止。
三、啟動服務
C:\WINDOWS\system32>net start mysql80
MySQL80 服務正在啟動 ..
MySQL80 服務已經啟動成功。
四、登入測試
C:\WINDOWS\system32>mysql -u root -p Enter password: ****** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.26 MySQL Community Server - GPL Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select version(); +-----------+ | version() | +-----------+ | 8.0.26 | +-----------+ 1 row in set (0.00 sec) mysql> quit Bye