Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

鎼滅储浜嗕竴涓媘ysql.sock鍦ㄥ摢閲
find / -name mysql.sock
/tmp/mysql.sock

鎵浠ユ垜澶ц儐鐚滄祴锛屽洜涓洪樋閲屼簯閲嶅惎鏈嶅姟鍣ㄦ妸鎴戠殑閰嶇疆鏂囦欢鎼炰贡浜嗭紝鐞嗚涓婃垜鍙鍒/etc/my.cnf閲岄潰锛屾妸璺緞鏀逛竴鏀瑰氨鍙互浜
socket=/var/lib/mysql/mysql.sock
#socket=/tmp/mysql.sock

ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock

All posts

Other pages

鍙戣〃璇勮

鐢靛瓙閭欢鍦板潃涓嶄細琚叕寮銆 蹇呭~椤瑰凡鐢*鏍囨敞