Connect to the MySQL server: get the host name, username and password. Connect using the command line (mysql command) or a GUI tool (such as MySQL Workbench). Close the MySQL server connection: Confirm the current connection status. Use the exit command from the command line, click the "Disconnect" button or exit the program from the GUI tool.
How to connect and shut down the MySQL server
Connect to the MySQL server
Command line connection:
Use the mysql
command as follows:
<code>mysql -h 主机名 -u 用户名 -p 密码</code>
GUI tool connection:
Close the MySQL server
Command line shutdown: Use the <code>exit</code> command to disconnect from the server:
<code>exit</code>
Note:
The above is the detailed content of How to connect and shut down mysql server. For more information, please follow other related articles on the PHP Chinese website!