Warning the user/local/mysql/data directory is not owned by the mysql user

前端 未结 2 1015
别那么骄傲
别那么骄傲 2020-12-12 09:09

I can\'t start the mysql service in Snow Leopard, and in the panel prefs appears the message,

warning the user/local/mysql/data directory is not owned

2条回答
  •  时光取名叫无心
    2020-12-12 09:37

    This work for me in El Capitan & Sierra

    sudo chown -R _mysql:wheel /usr/local/mysql/data
    

    That's it.


    Update: to fix auto start

    I found it more useful if you fix Auto Starting too:

    sudo nano /Library/LaunchDaemons/com.mysql.mysql.plist
    

    And paste in:

    
    
      
        KeepAlive
        
        Label
        com.mysql.mysqld
        ProgramArguments
        
          /usr/local/mysql/bin/mysqld_safe
          --user=mysql
                
      
    
    

    Save it and then:

    sudo chown root:wheel /Library/LaunchDaemons/com.mysql.mysql.plist
    sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysql.plist
    sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist
    

    Then it will load on a restart.

    Reference: https://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-10-yosemite/

提交回复
热议问题