Error resolution Error:can ' t connect to local MySQL server through socket

Source: Internet
Author: User

Error:can ' t connect to local MySQL server through socket '/var/lib/mysql/mysql.sock ' (2)
Errno.: 2002
Workaround One:
Since you haven't started MySQL yet, when you start MySQL, Mysql.sock will automatically spawn./bin/safe_mysqld--user=root & (This is the default).
If not, MySQL permissions are not given, or other reasons
There is whether your MySQL started 650) this.width=650; "border=" 0 "src=" http://www.zhonghuaos.com/static/image/smiley/default/ Lol.gif "/> is generally difficult to come up with after startup.
Workaround Two:
1) The default Mysql.sock file is in the/tmp directory.
2) We build a soft connection, ln-s/tmp/mysql.sock/var/lib/mysql/mysql.sock

Second, restart MySQL appears: Timeout error occurred trying to start MySQL Daemon.
[[Email protected] mysql]# service mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]

There are two possible error daemon:
The first log HTTP is full, and the DF command detects if the disk is fully occupied.
Second MySQL has started, then use the command killall to kill MySQL, and then use Chkconfig mysqld off to restart the machine
This will not be an error when you start MySQL.

From: China System Forum www.zhonghuaos.com


This article is from the "8433603" blog, please be sure to keep this source http://8443603.blog.51cto.com/8433603/1540209

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.