So I have tried countless things to try to stop MySQL from running.
I've tried to stop the process but it keeps giving me this error:
Executing '/usr/local/mysql/support-files/mysql.server stop' 2013-12-23 21:08:29 -
Stop server: ERROR! MySQL server PID file could not 2013-12-23 21:08:29 -
Stop server: be found!
Here's a screenshot.
I've also tried the following:
result from last command:
~❯killall -9 mysqld
Password:
kill: kill 11963 failed: operation not permitted
~❯
and it still hasn't stopped running... unfortunately. I tried double checking with both the system preferences view as well as the mySQL workbench view. The system preferences says it's running. No response when I click stop. When I go to the workbench it says off and without me clicking "start" it just turns on.
So then I tried killing it and the results were as follows. Still hasn't stopped.. ugh.. (everything between the underscores below represents spacing)
~❯ps -A | grep mysql
11963 ?? _ _ _ _ . _ 0:01.27 --user=_mysql
14635 ttys000 _ _. _ 0:00:00 grep mysql
~❯sudo kill 11963
Password:
~❯
I then tried uninstalling all the MySQL files using the following commands:
- sudo rm /usr/local/mysql
- sudo rm -rf /usr/local/mysql*
- sudo rm -rf /Library/StartupItems/MySQLCOM
- sudo rm -rf /Library/PreferencePanes/MySQL*
- vim /etc/hostconfig and removed the line MYSQLCOM=-YES-
- rm -rf ~/Library/PreferencePanes/MySQL*
- sudo rm -rf /Library/Receipts/mysql*
- sudo rm -rf /Library/Receipts/MySQL*
- sudo rm -rf /var/db/receipts/com.mysql.*
All to no avail. Finally I thought if I maybe looked up all the files that had mysql in them and deleted the ones I was pretty sure were the right ones maybe this would work. So I used:
- sudo find / | grep -i mysql
Which showed all the files but still no luck.
Could anybody please help me figure this out? I feel like I'm way overdoing this.
MySql is a server, running all the time, unless you install it "on-demand" and run and stop it yourself. MySql Workbench is nothing but a client that connects to a server, it has nothing to do with the server itself.
Run the following command: mysql> SELECT GROUP_CONCAT(CONCAT('KILL ',id,';') SEPARATOR ' ') FROM information_schema. processlist WHERE user <> 'system user'; This will kill all your MySQL queries.
How did you install MySQL? You can try any of the below options. It totally depends what mySQL packaged you installed.
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 GOT IT! :D
I ended up going back to the activity monitor and searching for "mysql" and then hitting force quit and it stopped it. Although I had tried this previously and it did not work, for some reason it worked now.
I have Homebrew installed however I installed the mysql community server - Mac OS X 10.7 (x86, 64-bit), DMG Archive, yesterday.
I then used the command
sudo cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf
to finish the job. I also have MAMP installed but I wanted to follow along in this class I'm taking so I went with what they were using.
On top of that I've been playing around with these alfred workflows and I found a couple that are really cool but I'm not going to use them anymore until I know more of what I'm doing because I think they are what screwed things up so bad.
Here are the links to them both though. They basically allow you to start and stop your servers via alfred. If you know what you are doing they can be a nice little time saver.
Local Server Commands
Localhost (v1.1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With