欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

mysql在Mac各版本以及Linux的个版本启动和关闭

程序员文章站 2022-05-29 16:48:42
...
On Linux start/stop/restart from the command line:

/etc/init.d/mysqld start
/etc/init.d/mysqld stop
/etc/init.d/mysqld restart
Some Linux flavours offer the service command too

service mysqld start
service mysqld stop
service mysqld restart
or

service mysql start
service mysql stop
service mysql restart
On OS X to start/stop/restart MySQL pre 5.7  from the command line:

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
On OS X Yosemite/El Capitan to start/stop/restart MySQL post 5.7  from the command line:

sudo launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

sudo launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist