MySQL cannot be linked in Ubuntu

Source: Internet
Author: User

The username and password for installing mysql under Ubuntu are correct, but an error is returned when you connect to the database under myeclipse! Specific error code: Access denied for user 'root' @ 'localhost' (using password: YES )! I searched for a while and found that it was a permission problem, so I could not log on! The premise is that my database has a password and it is normal to log on from the command line!

The solution is as follows: grant all on *. * to root @ "%" identified by "password"; this solves the problem of permission allocation!


-------------------------------- Split line --------------------------------

Enter the mysql command: myql-u root-p *** and the following ERROR occurs: ERROR 2002 (HY000 ): can't connect to local MySQL server through socket '/var/run/mysqld. sock '(2 ). This problem is very difficult for me, because I just moved to linux and I don't understand it !! Therefore, mysql is uninstalled and re-installed. After countless times, I finally found out today that when I shut down the mysql process, I run the command myql-u root-p *** to report an error. Most people answer the permission question when searching on the Internet. Some people suggest re-installing. But Will some people close the local mysql service like me and log on to the client !! This is indeed a permission issue, because the service is not available, who gives you the permission! Note!

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.