久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

解決Can't connect to local MySQL server through socket '/tmp/mysql.sock'錯(cuò)誤

 旭仔80 2016-05-26

解決Can't connect to local MySQL server through socket '/tmp/mysql.sock'錯(cuò)誤

剛安裝完mysql,,進(jìn)行運(yùn)行測(cè)試,,報(bào)Can't connect to local MySQL server through socket '/tmp/mysql.sock'錯(cuò)誤,

[root@localhost mysql]# /usr/local/mysql/bin/mysqld_safe
131206 22:42:51 mysqld_safe Logging to '/var/log/mysqld.log'.
131206 22:42:51 mysqld_safe Starting mysqld daemon with databases from /data/mysql/data
131206 22:42:57 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
[root@localhost mysql]# /usr/local/mysql/bin/mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

檢查一下mysql的運(yùn)行狀態(tài)
[root@localhost mysql]# ps -ef | grep mysql
root     32092  2108  0 22:43 pts/0    00:00:00 grep mysql

查看/tmp文件夾的確沒有mysql.sock文件,,

通過find命令查找

[root@localhost /]# find / -name mysql.sock
/var/lib/mysql/mysql.sock

原來安裝到/var/lib/mysql/mysql.sock這個(gè)位置啦,,我們需要修改my.cnf文件

[root@localhost /]# vi /usr/local/mysql/my.cnf

[client]
character-set-server = utf8
port    = 3306
socket  = /var/lib/mysql/mysql.sock
......

保存之后即出,,重新啟動(dòng)mysql,。

[root@localhost mysql]# /usr/local/mysql/bin/mysqld_safe &

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,,不代表本站觀點(diǎn),。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,,謹(jǐn)防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào),。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多