PID error on mysql.server start?

后端 未结 7 1611
名媛妹妹
名媛妹妹 2020-12-01 03:19

I\'ve just tried installing MySQL using homebrew (on Mac OS X 10.6), but I\'ve run across an issue at the first hurdle. When trying to manually start the server (mysql.serve

7条回答
  •  醉话见心
    2020-12-01 04:06

    I ran into the same issue while trying to install MySQL 5.5.15 in Lion using homebrew and resolved the issue with:

    mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
    

    and creating a the file ~/my.cnf

    with the content:

     [mysqld]
       basedir=/usr/local/Cellar/mysql/5.5.15
       datadir=/usr/local/var/mysql
    

    basedir - should be your current MySQL instalation dir datadir - should be the location of MySQL data

    You can figure out that too location by watching the make command during the "brew install mysql" searching for something like this:

    -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.5.15 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/mysql
    

    Where DCMAKE_INSTALL_PREFIX = basedir and DMYSQL_DATADIR = datadir

提交回复
热议问题