can't start MySql in Mac OS 10.6 Snow Leopard

后端 未结 16 2578
灰色年华
灰色年华 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: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.

提交回复
热议问题