Can't connect to local MySQL server through socket '/opt/data/mysql/mysql.sock'
另外看看是不是許可權問題.
2、確定你的mysql.sock是不是在那個位置,
mysql -u 你的mysql使用者名稱 -p -S /opt/data/mysql/mysql.sock
3、試試:service mysqld start
4、如果是許可權問題,則先改變許可權 #chown -R mysql:mysql /var/lib/mysql
[[email protected] ~]# /etc/init.d/mysqld start
啟動 MySQL: [ 確定 ]
[[email protected] ~]# mysql -u root -p
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
原因是,/var/lib/mysql 的訪問許可權問題。
接著啟動伺服器
shell> /etc/init.d/mysql start
伺服器正常啟動後察看 /var/lib/mysql 自動生成mysql.sock檔案。
相關推薦
Can't connect to local MySQL server through socket '/opt/data/mysql/mysql.sock'
1、先檢視 /etc/rc.d/init.d/mysqld status 看看mysql是否已經啟動. 另外看看是不是許可權問題. 2、確定你的mysql.sock是不是在那個位置, mysql -u 你的mysql使用者名稱 -p -S /opt/data/mysql/m
連接Mysql提示Can’t connect to local MySQL server through socket的解決方法
127.0.0.1 方式 mic div conn 三種 問題 ati my.cnf 轉:http://aiezu.com/article/mysql_cant_connect_through_socket.html 有時候,當我們使用“mysql”、“mysqladmin
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
local soc sock localhost 端口 cal error 優先 使用 當使用host參數為“localhost”連接Mysql服務時,會優先使用“sock文件”進行連接,而不是使用“IP:端口”進行連接,而Mysql嘗試使用“sock文件”進行連接時,卻無
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 的解決辦法
mark logs 都是 try cal iat resp 路徑 str 更換mysql數據目錄後出現ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysql
Can‘t connect to local MySQL server through socket
ERROR 2002(HY000)# mysqlERROR 2002(HY000):Can't connect to local MySQL server through socket '/tmp/mysql.socket'# ln -s /usr/local/mysql/data/m
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var mysql 啟動不了
nag could ice etc ket nbsp call cti connect ps -A | grep -i mysql kill 列出來的進程 service mysql start 我的問題就解決了 -----------------------------
Can’t connect to local MySQL server through socket
MySQL server throughmysql,mysqldump,php連接mysql服務常會提示下面錯誤:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mys
報了:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)的錯。
解決方法 roo 默認安裝 Owner ins ror exp bin iat 解決方法: 1.查看是不是mysql權限的問題 (默認安裝方式為 yum -y install mysql) 轉到 /etc/rc.d/init.d/目錄下 [root@xxx init.d]
mysql數據庫提示ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
mar cti 成功 copyright visio 無法 starting 數據 連接數據庫 ①無提示無法通過/var/lib/mysql/mysql.sock連接數據庫; [root@proeim mysql]# mysql -uxxx -pxxx -Dxxx -A E
Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ 解決
bsp 文件讀取 my.cnf dir spa min pre 啟動 style mysql 改變 basedir 目錄,啟動後客戶端登陸出現 Can’t connect to local MySQL server through socket ‘/var/lib/mys
連線Mysql提示Can’t connect to local MySQL server through socket各種情況以及解決辦法(轉載)
轉自:http://www.aiezu.com/db/mysql_cant_connect_through_socket.html 產生此問題的原因一般有兩個: 1、mysql服務未正常執行: 由於mysql的socket檔案是由mysqld服務啟動時建立的,如果mysqld服務未正常啟動,soc
連接Mysql提示Can’t connect to local MySQL server through socket各種情況以及解決辦法(轉載)
文件的 字符 -o exe localhost user body external The 轉自:http://www.aiezu.com/db/mysql_cant_connect_through_socket.html 產生此問題的原因一般有兩個: 1、mysql服務
Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ 解決
mysql 改變 basedir 目錄,啟動後客戶端登陸出現 Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ 問題,解決方式如下: /etc/my.cnf &nbs
ubuntu下mysql連結出現錯誤:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
轉自:https://www.cnblogs.com/adolfmc/p/5875584.html ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
linux 系統中系統關機後,mysql啟動失敗報錯:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '
自己在阿里雲伺服器上安裝好執行環境後,mysql都是正常使用的,昨天強制關閉伺服器後,重新啟動伺服器,發現數據庫無法啟動報錯:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/va
MySQL 報錯:ERROR 2002 (HY000): Can't connect to local MySQL server through socket
一、錯誤現場還原: 下面我們通過三種方式來連線,然後觀察提示的錯誤資訊: 1、直接使用“mysql”命令,不帶主機名引數; 2、使用帶了主機名“localhost”引數的“mysql -h localhost”命令; 3、使用帶了主機名“127.0.
{linux} Can't connect to local MySQL server through socket '/tmp/mysql.sock'
安裝mysql成功後,登陸mysql -uroot -p輸入密碼發生 mysql -uroot -p Enter password: ERROR 2002 (HY000): Can't connect
mysql--ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 關於Mysql啟動報錯問題,通過樓主查詢,發現又是空間不足的問題,但這次不是網站日誌,
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysqld.sock'
先檢視 /etc/rc.d/init.d/mysqld status 看看m y s q l 是否已經啟動. 另外看看是不是許可權問題. ———————————————————————————— [[email protected] beinan]#chown -R mysql:mysql /var
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
1:下載 [[email protected] /]# tar -xzvf mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz -C /usr/local/ 1 3修改檔案 [[email protecte