MySQL does not start when upgrading OSX to Yosemite or El Capitan

后端 未结 18 2034
南方客
南方客 2020-12-04 09:59

I know similar questions exist, such as MySQL with MAMP does not work with OSX Yosemite 10.10. However, I do have MAMP, nor XAMPP installed on my computer.

When I tr

相关标签:
18条回答
  • 2020-12-04 10:05

    I’ve got a similar problem with MySQL on a Mac (Mac Os X Could not startup MySQL Server. Reason: 255 and also “ERROR! The server quit without updating PID file”). After a long trial and error process, finally in order to restore the file permissions, I’ve just do that:

    * launch the Disk Utilities.app
    * choose my drive on the left panel
    * click on the “Repair disk permissions” button

    This did the trick for me.

    Hoping this can help someone else.

    0 讨论(0)
  • 2020-12-04 10:05

    None of the above worked.. but installing a new version of MySQL did the trick.

    0 讨论(0)
  • 2020-12-04 10:06

    You just need to create the user mysql (mysql installation script creates _mysql)

    sudo vipw

    duplicate line that contains _mysql

    Change for the duplicated line _mysql to mysql

    sudo /usr/local/mysql/support-files/mysql.server start
    Starting MySQL
    .. SUCCESS!
    
    0 讨论(0)
  • 2020-12-04 10:07

    Same happened to me! So I tried to startup again after I had terminated the running mysql application, and that worked!

    0 讨论(0)
  • 2020-12-04 10:09

    You will sometimes miss previous data if you try to install new version.. Please use the following in your terminal and I guarantee that mySql will start running in no time..

    sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
    

    Remember, it will ask for your Machine password and not mysql password..

    0 讨论(0)
  • 2020-12-04 10:11

    Open a terminal:

    1. Check MySQL system pref panel, if it says something along the line "Warning, /usr/local/mysql/data is not owned by 'mysql' or '_mysql'

    2. If yes, go to the mysql folder cd /usr/local/mysql

    3. do a sudo chown -R _mysql data/

    4. This will change ownership of the /usr/local/mysql/data and all of its content to own by user '_mysql'

    5. Check MySQL system pref panel, it should be saying it's running now, auto-magically. If not start again.

    6. Another way to confirm is to do a

      netstat -na | grep 3306

    It should say:

    tcp46      0      0  *.3306                 *.*                    LISTEN
    

    To see the process owner and process id of the mysqld:

    ps aux | grep mysql
    
    0 讨论(0)
提交回复
热议问题