Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Mysql: Access Denied Error

Mysql: Access Denied Error

Mysql: Access Denied Error

I'm trying to access mysql (3.22.32) using a perl script which calls a java utility.  I've tried adding rows into the mysql table, but it doesn't seem to make a difference.  I can get into mysql using the user name and password described below by typing it in from the command line.  For some reason the perl/java can't get in.  Here's the call from the perl script

java -cp /home/cup1/mysql_setup/VGDB-Server.jar Util.DBInsert fowlpox.gb.temp -dbName=test1 -dbUser=biocuser -dbPassword=biocuser

Which gives the following error.

Exception in thread "main" java.sql.SQLException:
E2011 Access error  1045 Access denied for user: 'biocuser@localhost' (Using password: YES)
        at twz1.jdbc.mysql.jdbcMysqlBase.errMessage(jdbcMysqlBase.java:432)
        at twz1.jdbc.mysql.jdbcMysqlConnex.errHandlerL(jdbcMysqlConnex.java:667)        at twz1.jdbc.mysql.jdbcMysqlConnex.errHandlerPS(jdbcMysqlConnex.java:673)
        at twz1.jdbc.mysql.jdbcMysqlConnex.xOpen(jdbcMysqlConnex.java:328)
        at twz1.jdbc.mysql.jdbcMysqlConnex.<init>(jdbcMysqlConnex.java:227)
        at twz1.jdbc.mysql.jdbcMysqlDriver.connect(jdbcMysqlDriver.java:105)
        at java.sql.DriverManager.getConnection(DriverManager.java:453)
        at java.sql.DriverManager.getConnection(DriverManager.java:133)
        at Util.DBInsert.main(DBInsert.java:29)

Line 29 in Util.DBInsert is:
Connection con = DriverManager.getConnection( url, DBInsertConfig.dbUser , DBInsertConfig.dbPassword );

Any ideas would be useful.


Paul Ripley

RE: Mysql: Access Denied Error

figured out the problem.

My hosts file needed to have localhost.localdomain instead of just localhost.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close