Forums Register Login

Exception while connecting to database

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Have you seen this thread?
Dave
I think he's gonna try to grab my monkey. Do we have a monkey outfit for this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1393 times.
Similar Threads
mysql query
MYSQL Connection error Plz help
Mysql/JDBC Access Denied Error
"main" java.sql.SQLException: Access denied for user 'root'@'192.168.1.1' (using password: YES)
Connecting with MySql
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 09:08:18.