mariadb troubles in macos - RLidea/dev.docs GitHub Wiki

MacOS μ—μ„œ λ§Œλ‚œ mariadb νŠΈλŸ¬λΈ”λ“€

κ°‘μžκΈ° 접속이 μ•ˆ 됨

$ mariadb -u root -p
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
$ brew services list
Name              Status  User    Plist
mariadb           started me /Users/me/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
$ sudo lsof -i :"3306"
(nothing)
$ less /usr/local/etc/my.cnf
[mysqld]
port=3306

μ•„λž˜ λ‚΄μš©λ“€μ„ μ§€μš°κ³  μž¬μ„€μΉ˜ν•˜λ‹ˆ λ¬Έμ œκ°€ ν•΄κ²°λ˜κΈ΄ ν–ˆλ‹€.

$ brew services stop mariadb
$ brew uninstall mariadb
$ rm -rf /usr/local/var/mysql
$ rm /usr/local/etc/my.cnf
$ brew install mariadb

μ΄λ•Œ, /usr/local/var/mysql μ—λŠ” 데이터 νŒŒμΌλ“€μ΄ λ“€μ–΄μžˆμœΌλ‹ˆ κΌ­ 백업을 ν•΄λ‘μž.