Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop mysqld

Tags:

mysql

macos

People also ask

How do I stop a process mysqld Mac?

Just go to task manager. Then in process, search mysqld. right click on mysqld then click on stop. with this process you can stop it without using commands.

Can I end mysqld exe?

go to task manager - processes tab and find mysqld. stop it. go to task manager - services tab find mysql service and stop it.


Try:

/usr/local/mysql/bin/mysqladmin -u root -p shutdown 

Or:

sudo mysqld stop

Or:

sudo /usr/local/mysql/bin/mysqld stop

Or:

sudo mysql.server stop

If you install the Launchctl in OSX you can try:

MacPorts

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.

Homebrew

launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

Binary installer

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


There is an alternative way of just killing the daemon process by calling

kill -TERM PID

where PID is the value stored in the file mysqld.pid or the mysqld process id which can be obtained by issuing the command ps -a | grep mysqld.


I did it with next command:

sudo killall mysqld

I found the answer here.

Use

sudo stop mysql

For Windows, you can run this command directly if mysql/bin is in your path.

mysqladmin -u root -p shutdown

Worked for me on mac

a) Stop the process

sudo launchctl list | grep -i mysql

If the result shows anything like: "xxx.xxx.mysqlxxx"

sudo launchctl remove xxx.xxx.mysqlxxx

Example: sudo launchctl remove org.macports.mysql56-server

b) Disable to autostart the process

sudo launchctl unload -wF /Library/LaunchDaemons/xxx.xxx.mysqlxxx.plist

Example: sudo launchctl unload -wF /Library/LaunchDaemons/org.macports.mysql56-server.plist

  • Finally reboot your mac

Note: In some cases if you tried "a)" first, you need to reboot again before try b).