MySQL connection error in MyEclipse

Source: Internet
Author: User


A few days ago, someone asked me a question about the failure to connect to MySQL in MyEclipse. At that time, I was unable to find out the problem and failed to get the answer after some online searches. I never gave up because of my curiosity, but the problem was finally solved by an unintentional attempt. Next I will "Restore the scene ". Connect to MySQL: window --> show view --> other --> MyEclipse Database --> DB Browser in MyEclipse, such as www.2cto.com
Click DB Browser, and the View Interface will change. In the blank area of the DB Browser tab, right-click and choose New ..., That is, to create a connection to MySQL, the following dialog box is displayed to fill in the information:

The Driver name can be set according to your preferences. When the Driver template is selected for the Connection URL, jdbc: mysql: //
In order to verify whether the password is wrong, I immediately tried it on the MySQL terminal. after entering the same password, I successfully connected to the MySQL database, why can't the same password be used in MyEclipse on the terminal? Some online searches still fail. The final problem is solved in this way. Open the MySQL terminal, enter the password, and query the user table (select * from mysql. only one root user exists in the result. You can change the User name in to root. Www.2cto.com

Now the truth is clear. Click Test Driver again. The following dialog box is displayed, indicating that MySQL is successfully connected.

To better understand the problem, I re-installed MySQL. This installation is not just to see every step of the installation. When installing this step, I found that the user is not actually another one, it must be root. Why is it a step in installation:

If the check item is Modify Security Settings, the user is root by default (circled in red), and the password of the root user is in the next two text boxes, this explains why select * from mysql is used. the user only finds the root user. Author kmyangyang

Related Article

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.