Can't connect to local MySQL server through socket homebrew

后端 未结 21 1939
萌比男神i
萌比男神i 2020-12-04 05:54

I recently tried installing MySQL with homebrew (brew install mysql) and when I try to run it I get the following error:

ERROR 2002 (HY00

21条回答
  •  情歌与酒
    2020-12-04 06:13

    I faced the same problem on my mac and solved it, by following the following tutorials

    https://mariadb.com/resources/blog/installing-mariadb-10116-mac-os-x-homebrew

    But don't forget to kill or uninstall the old version before continuing.

    Commands:

    brew uninstall mariadb
    
    xcode-select --install
    
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - See more at: https://mariadb.com/resources/blog/installing-mariadb-10116-mac-os-x-homebrew#sthash.XQoxRoJp.dpuf
    
    brew doctor
    
    brew update
    
    brew info mariadb
    
    brew install mariadb
    
    mysql_install_db
    
    mysql.server start
    

提交回复
热议问题