which mysql
mysql --version
使用mysql.server
启用脚本来执行,默认在/usr/local/mysql/support-files
这个目录中。
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
sudo /usr/local/mysql/support-files/mysql.server status
mysql -u root -p
## 回车之后,再输入密码