启动MySQL服务:
brew services start mysql
手动启动服务:
mysql.server start
例如:
mysql.server start
Starting MySQL
.. SUCCESS!
停止 MySQL服务:
brew services stop mysql
或者
mysql.server stop
重启MySQL服务:
brew services restart mysql
或者
mysql.server restart
进入 MySQL命令行界面:
mysql -u root -p
例如:
mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.3.0 Homebrew
Copyright (c) 2000, 2024, 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 curren