To find out the start command for mysqld (using a mac) I can do:
ps aux|grep mysql
I get the following output, which allows me to start mysql server.
/usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=...
How would I find the necessary command to stop mysql from the command line?
/usr/local/mysql/bin/mysqladmin -u root -p shutdown
sudo mysqld stop
sudo /usr/local/mysql/bin/mysqld stop
sudo mysql.server stop
If you install the Launchctl in OSX you can try:
sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql.plist sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql.plist
Note: this is persistent after reboot.
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop sudo /Library/StartupItems/MySQLCOM/MySQLCOM start sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart
I found that in: https://stackoverflow.com/a/102094/58768
Answered By – squiter
Answer Checked By – Gilberto Lyons (BugsFixing Admin)