[NBLUG/talk] MySql/JDBC connnectivity issue.

Eric Eisenhart eric at nblug.org
Tue May 20 20:52:00 PDT 2003


On Tue, May 20, 2003 at 08:17:24PM -0700, Mitch Patenaude wrote:
> I can connect to a MySQL database with my test user using the command 
> line tools, but when I use the Connector/J JDBC driver to (attempt) to 
> connect to a database.  I'm getting refused connections that look like:
> 
> mrp at calisto explorer]$ java testGrid
> Connect URL = jdbc:mysql://localhost/trackpoints?user=test&password=test
> java.sql.SQLException: Invalid authorization specification: Access 
> denied for user: 'test at localhost.localdomain' (Using password: YES)
> 
> (username/password changed in output, but the principal is there.)
> 
> After a google search, it appears that I need to add permissions TCP 
> connections (the command line tool uses a named pipe).  But I can't 
> seem to find how to do this.  Can anybody help?

First off, you can test whether you've got the access right with "-h
localhost" or "--host=localhost" on the mysql commandline.

Check your startup routine.  Make sure "--skip-networking" isn't in there at
all.

Edit /etc/my.cnf.  Look around the "[mysqld]" section for port, host and
network related things; I think you may need to uncomment a line in there.

Go run the same grant command that you used to give your account access,
except change "user" to "user@'127.0.0.1'" (with the single-quotes).
-- 
Eric Eisenhart
NBLUG Co-Founder & Vice-President Pro Tempore
The North Bay Linux Users Group
http://nblug.org/
eric at nblug.org, IRC: Freiheit at freenode, AIM: falschfreiheit, ICQ: 48217244



More information about the talk mailing list