The process probably is probably respawning each time when you try to kill it.
You can always try to use pgrep
and kill them at one go, e.g.:
kill $(pgrep mysql)
But I think the solution would be to find the source where it's get restarted each time, so try checking list of your running/system daemons by using launchctl
:
sudo launchctl list
Then unload as described in: How do you stop MySQL on a Mac OS install?
If you've the problem with:
[ERROR] Can't open the mysql.plugin table.
probably you're running it wrong, by not specifying the right mysql data directories. So maybe it's worth to load them again via launchctl
, check how they were run before, or locate your configuration file and double check the configuration, or you've the wrong permissions set-up.
Here is sample syntax how you can run it manually:
mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/var/db/mysql --datadir=/var/db/mysql --plugin-dir=/var/db/mysql/lib/plugin --user=mysql --tmpdir=/tmp/mysql/tmpdir --log-error=/var/log/mysql_error_log.err --pid-file=/tmp/mysql/mysql.pid --socket=/tmp/mysql/mysql.sock --port=3306
When using MAMP, the command-line parameters looks like:
/Applications/MAMP/Library/bin/mysqld --defaults-file=/Applications/MAMP/tmp/mysql/my.cnf --basedir=/Applications/MAMP/Library --datadir=/Library/Application Support/appsolute/MAMP PRO/db/mysql --plugin-dir=/Applications/MAMP/Library/lib/plugin --user=mysql --tmpdir=/Applications/MAMP/tmp/mysql/tmpdir --log-error=/Applications/MAMP/logs/mysql_error_log.err --pid-file=/Applications/MAMP/tmp/mysql/mysql.pid --socket=/Applications/MAMP/tmp/mysql/mysql.sock --port=3306