/var/lib/mysql/mysql.sock the wrong solution

Source: Internet
Author: User

Problem Description:
There is no problem finding/var/lib/mysql/mysql.sock or being used with mysql-uroot-p login.

You can log in using the following command: Mysql-p--socket=/tmp/mysql.sock

Workaround:
1. Most mysql is installed in rpm mode. It will automatically look for/var/lib/mysql/mysql.sock this file.

Check the location of the Mysql.sock.
The field of the socket through the/ETC/MY.CNF.
If the socket looks like this:

Socket=/tmp/mysql.sock

2. Add a soft connection (equivalent to a shortcut in Windows) for Mysql.sock. such as the actual mysql.sock under the/tmp/.
Run the following command.

Ln-s/tmp/mysql.sock/var/lib/mysql/mysql.sock

If it is the SUSE system using YaST installed MySQL, but how also can not start up, a start said can not find Mysql.sock, using the Find command also found Mysql.sock, find some information, only to find that need to first to/etc/ Start the MySQL service under the INIT.D path,./mysql start (see if you need to use root), after the service is started, you can connect to the database.

/var/lib/mysql/mysql.sock the wrong solution

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.