In Linux, when Mysql is used after installation, the following error occurs: varlibmysqlmysql. sock '2.

Source: Internet
Author: User
I have re-installed mysql in Linux. After the installation, I cannot start it. The prompt can #39; tconnecttolocalmysqlserverthroughsocket #39; v appears.

I have re-installed mysql in Linux. After the installation, I cannot start it. The prompt can #39; t connect to local mysql server through socket #39; v appears.

I have re-installed mysql in Linux. After the installation, I cannot start it. The prompt "can't connect to local mysql server through socket" var lib mysql "appears. sock's 2 error. I found it online and found a number of solutions. I can try it later. After the operation, the couldn't find manager or server error occurs again. Continue to google and read a solution, so I tried it. It's still true.

Write down:

[Root @ server ~] #/Etc/init. d/mysql start

Starting MySQL... Couldn't find MySQL manager or server

Or this error may display in WHM:

Can't connect to local mysql through socket/var/lib/mysql. sock

Apparently some RPM packages install this file with an incorrect path in the my. cnf file by default, leaving the service unable to start on its own. to fix, simply open/etc/my. cnf in vi and comment out the 'basedir =/var/lib 'line like so:

# Basedir =/var/lib

Save the file, and restart MySQL (/etc/init. d/mysql restart ).

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.