Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’

來源:互聯網
上載者:User
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists
先查看/var/log/mysql.err
發現為空白,說明mysql沒有起來。
再查 daemon.log
也只提示mysqld錯誤,
查看syslog 發現如下資訊
/usr/sbin/mysqld: Disk is full writing '/var/log/mysql/mysql-bin.000442' (Errcode: 28). Waiting for someone to free space
原來是硬碟空間不足了!
呵呵,mv走一部分log。mysql自動起來了!
類似問題可能也有以下原因
1,目錄沒有寫入權限
2,ip地址更換後與/etc/mysql/my.cnf中bind address不一致.修改ip bind. 然後/etc/init.d/mysql restart 應該可以搞定.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.