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!