• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Exception while connecting to database

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you seen this thread?
Dave
 
reply
    Bookmark Topic Watch Topic
  • New Topic