mac 升級mysql無法啟動,無pid,遇到的那些坑
一、bug發生原因:在mysql官網下載的5.7.21版本,安裝後遇到如下問題:
2.當執行啟動時,報PID找不到;
xxxdeMacBook-Air:~ xxx$ sudo /usr/local/mysql/support-files/mysql.server restart
ERROR! MySQL server PID file could not be found!
Starting MySQL
./usr/local/mysql/bin/mysqld_safe: line 198:4696 Trace/BPT trap: 5 nohup /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=tcmonlinedeMacBook-Air.local.err --pid-file=/usr/local/mysql/data/tcmonlinedeMacBook-Air.local.pid --socket=/tmp/mysql.sock --port=3306 < /dev/null > /dev/null 2>&1
ERROR! The server quit without updating PID file (/usr/local/mysql/data/tcmonlinedeMacBook-Air.local.pid).
tcmonlinedeMacBook-Air:~ tcmonline$ sudo /usr/local/mysql/support-files/mysql.server stop
ERROR! MySQL server PID file could not be found!
在以上兩個問題上面繞了很多彎子,查找了很多關於以上兩個問題的解決方法,但是都不行。只能採用解除安裝重灌了。。。(為了解除安裝乾淨,請參照網上的解除安裝過程)
二、去官網下載5.7.20版,8版是開發版,也可以用。就是下載的這個地方放在檔案裡,藏的挺深。剛開始沒發現,現在曝光。
三、用dmg格式一條龍安裝。
下載成功後直接啟動了mysql。
還非常友好的給了一個初始密碼
修改密碼就可以直接用了。這次最大的坑就是下了一個永遠裝不好的版本,和碰到兩個不是根本原因的bug。