I have Mysql5.1.41 win 32,I am able to start the server throgh command prompt, and I have a mysql-connector-java-5.1.10-bin.jar which I have place in common/lib of tomcat as well as lib/ext but when I craete new database connection with this driver,I am not able to connect to MYSQL.
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
Actually, you can also get this message when the user/source combination aren't allowed rights, even when the password is correct. MySQL Is very picky about who can access what and how they can access it.
MySQL as it comes "out of the box" usually is set up to authenticate root with no password required when logging in from localhost, but that's not considered to be very good practice, so often a password is assigned by a database administrator.
However, since the root account is normally capable of doing every dangerous thing in the book, MySQL-wise, it's not recommended to use it for applications. You should set up a separate non-root account for that purpose, and grant it access to the application database resources as appropriate.
"privilege" comes from the Latin words for "private" and "law" (legal) and dates to feudal times. To "claim privilege" meant that you were above the laws that applied to the common people.
posted 10 years ago
I am able to connect now,I have created a new user.