can't start MySql in Mac OS 10.6 Snow Leopard

后端 未结 16 2491
灰色年华
灰色年华 2020-12-04 13:11

I\'ve googled this and could\'nt find anything new and useful for Apple\'s new OS SnowLeopard. I wonder if this is my mistake or I do need to do something?

this is w

相关标签:
16条回答
  • 2020-12-04 13:21

    my apple processor version10.6.3 is error and i can click system preference

    0 讨论(0)
  • 2020-12-04 13:23

    I'm not entirely sure why my MySQL installation stopped working but it started trying to run as the incorrect user, as mysql instead of _mysql

    Here was my error output:

    140422 14:46:14 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
    140422 14:46:14 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
    140422 14:46:14 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!
    
    140422 14:46:14 [ERROR] Aborting
    
    140422 14:46:14 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
    

    The fix for me was to edit /usr/local/mysql/bin/mysqld_safe and set the user line at the top from:

    user='mysql'
    

    to

    user='_mysql'
    

    That line was on line 25 for me with mysql-5.5.37-osx10.6-x86_64

    0 讨论(0)
  • 2020-12-04 13:25

    open Terminal

    cd /usr/local/mysql/support-files
    sudo nano mysql.server

    Find the lines:

    basedir=
    datadir=

    change them to

    basedir=/usr/local/mysql
    datadir=/usr/local/mysql/data

    0 讨论(0)
  • 2020-12-04 13:27

    Okay... Finally I could install it! Why? or what I did? well I am not sure. first I downloaded and installed the package (I installed all the files(3) from the disk image) but I couldn't start it. (nor from the preferences panel, nor from the termial)

    second I removed it and installed through mac ports.

    again, the same thing. could not start it.

    Now I deleted it again, installed from the package. (i am not sure if it was the exact same package but I think it is) Only this time I got the package from another site(its a mirror).

    the site:

    http://www.mmisoftware.co.uk/weblog/2009/08/29/mac-os-x-10-6-snow-leopard-and-mysql/

    and the link:

    http://mirror.services.wisc.edu/mysql/Downloads/MySQL-5.1/mysql-5.1.37-osx10.5-x86.dmg

    1.- install mysql-5-1.37-osx10.5-x86.pkg

    2.- install MySQLStartupItem.pkg

    3.- install MySQL.prefpanel

    And this time is working fine (even the preferences panel!)

    Nothing special, I don't know what happened the first two times.

    But thank you all. Regards.

    0 讨论(0)
  • 2020-12-04 13:28

    In order just to get MySQL working again (I haven't yet looked at startup), there is no need to reinstall . I've got my copy working by doing the following:

    What you need to do is this:

    sudo ln -s /usr/local/mysql-5.0.51a-osx10.5-x86_64 /usr/local/mysql

    This creates a symbolic link from the /usr/local/mysql directory to the location where MySQL is. This is critical, because unless you carefully backed up all your databases with mysqldump before running the Leopard upgrade, that's where all your data lives - and restoring it simply from a whole-hard-drive backup is going to be hard.

    Now you can go to the right directory and start up mysql:

    cd /usr/local/mysql-5.0.51a-osx10.5-x86_64

    sudo ./bin/mysqld_safe

    You can now do the usual CTRL-Z to get back to the shell. To make sure mysqld is running, type:

    sudo ps -A|grep mysql

    I got something like this:

    1220 ttys000 0:00.02 /bin/sh ./bin/mysqld_safe
    1240 ttys000 0:00.39 /usr/local/mysql-5.0.51a-osx10.5-x86_64/bin/mysqld --basedir=/usr/local/mysql-5.0.51a-osx10.5-x86_64 --datadir=/usr/local/mysql-5.0.51a-osx10.5-x86_64/data --user=mysql --pid-file=/usr/local/mysql-5.0.51a-osx10.5-x86_64/data/dkmac-2.home.pid --port=3306 --socket=/tmp/mysql.soc

    My copy of mysql now seems to work fine. At the very least, it's good enough to run mysqldump on all my databases, so that if I need to upgrade mysql by other means and dump my data directory, I'm still in good shape.

    0 讨论(0)
  • 2020-12-04 13:31

    Maybe this answer helps:

    mysql5.58 unstart server in mac os 10.6.5

    I just installed MySQL 5.5.8 (mysql-5.5.8-osx10.6-x86_64.dmg) on Mac os X 10.6.5 and also had the problem that MySQL was not starting.

    After reading this post: http://forums.mysql.com/read.php?11,399397,399606#msg-399606 and editing the file as suggested everything started working.

    I also did

    sudo chown -R root:wheel /Library/StartupItems/MySQLCOM
    

    after reading https://discussions.apple.com/message/12820394 since when restarting my Mac OSx 10.6.6 it kept on asking something about not enough privileges. The line above solved that issue.

    Now everything is working.

    0 讨论(0)
提交回复
热议问题