posted 20 years ago
Hi,
i am getting the following exception when i try to connect to mysql from my program.
i am trying to connect with the following program statement
>>sql=DriverManager.getConnection("jdbc:mysql://Bithorax/mysql?user=samurai&password=helloworld");
The user samurai already exists in the database;
exception:
------------------------------------------------------------------
java.sql.SQLException: General error, message from server: "Access denied for user: 'samurai@bithorax' to database 'mysql'"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1876)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1803)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:887)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1627)
at com.mysql.jdbc.Connection.<init>(Connection.java:427)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:395)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
----------------------------------------------------------
i am unable to traceout the problem please help in this.
Thanks
karan