简体   繁体   中英

which mysql.server should I use to restart mysql in MacOS?

I'm trying to restart mysql on my MacBook and I found this command: sudo /usr/local/mysql/support-files/mysql.server restart

However, /usr/local/mysql/support-files/mysql.server does not exist in my mac. The following exists:

john@John-MacBook-Pro:~/Infervision/logs$ find / -name "*mysql.server"  2>/dev/null 
/usr/local/bin/mysql.server
/usr/local/Cellar/mysql/5.7.11/bin/mysql.server
/usr/local/Cellar/mysql/5.7.11/support-files/mysql.server

which one should I use?

You should use brew command for restarting your services installed using Brew. The command to restart MySQL would be:

brew service restart mysql

To list various services you can use:

brew services list

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM