I am not sure how to fix this:
dyn-72-33-214-45:python mona$ sudo /usr/local/mysql/bin/mysqld stop
2014-09-06 09:49:04 0 [Warning] TIMESTAMP with implicit DE
to run mysqld as root user from command line you need to add the switch/options --user=root
mariadb run as system root user
osx could be using launchctl to launch mysql. Try this:
sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist
On top of @mise's answer, After I installed MacOS Mojave, I also had to change files ownership on all my MAMP directory and contents).
From the Finder, I went in Application/MAMP, showed files info (cmd + i) and in permissions section added myself with read & write perms, then from the little gear applied to all the children.
The MySQL daemon should not be executed as the system user root which (normally) do not has any restrictions.
According to your cli, I suppose you wanted to execute the initscript instead:
sudo /etc/init.d/mysql stop
Another way would be to use the mysqladmin tool (note, root is the MySQL root user here, not the system root user):
/usr/local/mysql/bin/mysqladmin --port=8889 -u root shutdown
Try this for Amazon Linux AMI or for centOS
sudo service mysqld restart
Very weird, but I got this error when I made a typo in the my.cnf file.
So it had nothing to do with the user directive not defined or not running as root-user.
My mistake was:
bind=192.168.1.2
instead of
bind-address=192.168.1.2