Fatal error: Please read “Security” section of the manual to find out how to run mysqld as root

前端 未结 14 1883
感动是毒
感动是毒 2020-12-23 13:25

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         


        
相关标签:
14条回答
  • 2020-12-23 14:12

    to run mysqld as root user from command line you need to add the switch/options --user=root

    mariadb run as system root user

    0 讨论(0)
  • 2020-12-23 14:18

    osx could be using launchctl to launch mysql. Try this:

    sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist
    
    0 讨论(0)
  • 2020-12-23 14:20

    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.

    0 讨论(0)
  • 2020-12-23 14:21

    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
    
    0 讨论(0)
  • 2020-12-23 14:21

    Try this for Amazon Linux AMI or for centOS

    sudo service mysqld restart
    
    0 讨论(0)
  • 2020-12-23 14:23

    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
    
    0 讨论(0)
提交回复
热议问题