Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mysql: Access Denied Error

Status
Not open for further replies.

pripley

Programmer
May 17, 2000
4
CA
I'm trying to access mysql (3.22.32) using a perl script which calls a java utility.&nbsp;&nbsp;I've tried adding rows into the mysql table, but it doesn't seem to make a difference.&nbsp;&nbsp;I can get into mysql using the user name and password described below by typing it in from the command line.&nbsp;&nbsp;For some reason the perl/java can't get in.&nbsp;&nbsp;Here's the call from the perl script<br><br>java -cp /home/cup1/mysql_setup/VGDB-Server.jar Util.DBInsert fowlpox.gb.temp -dbName=test1 -dbUser=biocuser -dbPassword=biocuser<br><br>Which gives the following error.<br><br>Exception in thread &quot;main&quot; java.sql.SQLException:<br>E2011 Access error&nbsp;&nbsp;1045 Access denied for user: 'biocuser@localhost' (Using password: YES)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at twz1.jdbc.mysql.jdbcMysqlBase.errMessage(jdbcMysqlBase.java:432)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at twz1.jdbc.mysql.jdbcMysqlConnex.errHandlerL(jdbcMysqlConnex.java:667)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at twz1.jdbc.mysql.jdbcMysqlConnex.errHandlerPS(jdbcMysqlConnex.java:673)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at twz1.jdbc.mysql.jdbcMysqlConnex.xOpen(jdbcMysqlConnex.java:328)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at twz1.jdbc.mysql.jdbcMysqlConnex.&lt;init&gt;(jdbcMysqlConnex.java:227)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at twz1.jdbc.mysql.jdbcMysqlDriver.connect(jdbcMysqlDriver.java:105)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.sql.DriverManager.getConnection(DriverManager.java:453)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.sql.DriverManager.getConnection(DriverManager.java:133)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at Util.DBInsert.main(DBInsert.java:29)<br><br>Line 29 in Util.DBInsert is:<br>Connection con = DriverManager.getConnection( url, DBInsertConfig.dbUser , DBInsertConfig.dbPassword ); <br><br><br>Any ideas would be useful.<br><br>Thanks<br><br>Paul Ripley
 
figured out the problem.<br><br>My hosts file needed to have localhost.localdomain instead of just localhost.<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top