| Bug #1239 | error while connecting to database | ||
|---|---|---|---|
| Submitted: | 10 Sep 2003 5:21 | Modified: | 2 Feb 2004 5:28 |
| Reporter: | Corneel Theben Tervile | Email Updates: | |
| Status: | No Feedback | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | OS: | Windows (Win2000) | |
| Assigned to: | Assigned Account | CPU Architecture: | Any |
[10 Sep 2003 5:51]
Konstantin Osipov
Authentification subsystem was changed in 4.1.1 (available via our public BitKeeper repository) Very likely that this bug has been already fixed. Consider upgrading the server.
[10 Sep 2003 6:33]
Mark Matthews
Also, please note that you'll need to use the latest nightly snapshot of Connector/J 3.1.x (from http://mmmysql.sourceforge.net/snapshots/dev/) to connect to MySQL-4.1.1, as the changes to authentication required changes in the JDBC driver.
[2 Feb 2004 5:28]
Konstantin Osipov
Last feedback on this bug dated 2003/10/10 I close the bug with 'No Feedback'. Feel free to reopen it if you have new information.

Description: I first used the database in a Java Servlet application without a password and everything worked fine. Later I set the security and I received VERY IRREGULARY an error: Invalid authorization specification: Access denied for user: 'someuser@127. 0.0.1' (Using password: YES) There are no constraints about max_connects etc on that user. Products: Java 1.4.1 or 1.4.2 MySQL 4.1.0-alfa-max-nt (not a production release!) Connector/J 3.0.8 Jakarta Tomcat 4.1.27 How to repeat: That's the code: public static Statement connect() { try { Class.forName("com.mysql.jdbc.Driver"); Connection con=DriverManager.getConnection("jdbc:mysql://localhost/Enquete?user=someuser&password=somepassword"); Statement stmt=con.createStatement(); return stmt; } catch (Exception e) { //strange problem when connecting to MySQL: try reconnect System.out.println(e.getMessage()); Statement stmt=connect(); return stmt; } }