Solved a problem about MySQL login.

Source: Internet
Author: User

When I installed MySql in Susi, I encountered the following problem: I added a link file MySQL under/sbin/to point to/usr/local/MySQL/bin/MySQL, after the MySQL server is started, run the command $:>/usr/local/MySQL/bin/MySQL-u root-P enter password: *** to log on successfully, however, you cannot directly execute MySQL, as shown in the following figure: $:> mysql-u root-penter password: *** logon Failure: Error 2002 (hy000) cannot connect to local MySQL server throught socket '/var/lib/MySQL. socket '(2 ). why ?? Analysis: $:> which MySQL/usr/bin/MySQL indicates that MySQL executed at the prompt is not mysql in/sbin but msql in/usr/bin. run $:> echo $ path/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/sbin: /usr/x11r6/bin:/usr/sbin:/bin:/usr/games:/opt/gnome/bin:/usr/lib/MIT/bin: /usr/lib/MIT/sbin  Run/usr/bin in front of/sbin/, and then there is a MySQL in the/usr/bin directory. After deletion, it will be fine. .

 

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.