When these two days to develop Web projects in the idea, the connection MYSQL database, the question arises: Access denied for user 'root' @ 'localhost' (using password: YES).
Find information found by default the root account is not open remote access, you need to modify permissions.
solution:
Open the my.ini file in the MySQL directory, and finally add a line in file Skip-Grant-the Tables , save and close the file. (WIN7 installed by default, my.ini in C: \ ProgramData \ MySQL \ MySQL Server 5.6)
to restart the MySQL service.
MySQL command line to enter the BIN directory, enter "mysql -u root -p" (without entering a password), press Enter to enter the database. (WIN7 default installation, BIN directory: C: \ Program Files \ MySQL \ MySQL Server 5.6 \ bin)
to perform use mysql; , use mysql database.
Execution Update the User the SET password = PASSWORD ( "SA") the WHERE the User = 'root'; (change the root password)
to open the file in the MySQL my.ini directory, delete the last line of the "skip-grant-tables", save and close file.
Restart MySQL service.
Enter "mysql -u root -p 123456" on the command line, you can successfully connect to the database.
Completing the above steps, MyEclipse also successfully connected the MySQL.