Home  >  Q&A  >  body text

macos - 用mac 的包管理工具brew安装mysql总是报错是神马问题?求解

➜  ~  sudo  mysql.server start
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/zhangzhenxingdeMacBook-Pro.local.pid).
➜  ~  sudo  mysql.server start
Password:
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/zhangzhenxingdeMacBook-Pro.local.pid).

神马问题呢?

巴扎黑巴扎黑2729 days ago720

reply all(4)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-17 13:27:39

    Find the PID file, delete it and start it again.

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 13:27:39

    1.
    unset TMPDIR

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

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 13:27:39

    I also encountered this problem
    I found many solutions on Google and Baidu, but they didn’t work. Even after installing them many times, I found that there was a problem. The system-level daemon is starting

    /Library/LaunchDaemons is in this directory

    I deleted the mysql daemon and restarted the computer. Then I started mysql.server start and it was OK

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 13:27:39

    http://www.tuicool.com/articles/7n6J3ir

    reply
    0
  • Cancelreply