命令行操作mysql
- 启动MySQL
sudo /usr/local/mysql/support-files/mysql.server start
- 停止MySQL
sudo /usr/local/mysql/support-files/mysql.server stop
- 重启MySQL
sudo /usr/local/mysql/support-files/mysql.server restart
- 进入数据库,输入root密码
mysql -u root -p
sudo /usr/local/mysql/support-files/mysql.server start
sudo /usr/local/mysql/support-files/mysql.server stop
sudo /usr/local/mysql/support-files/mysql.server restart
mysql -u root -p