insert into user (user,host) values ('jeff','localhost');
flush privileges;
grant all on databaseName.* to jeff;
jeff = [EMAIL PROTECTED]
not [EMAIL PROTECTED]
So in your statement you should have used...
grant all on databaseName.* to [EMAIL PROTECTED];
select user,host from user; returns
jeff localhost
In Java, I use:
DriverManager.getConnection( /localhost/databaseName , 'jeff',null );
when the application tries to connect, DriverManager.getConnection() gets a
bad handshake error.
So I set the password in mysql with:
set password for jeff = password('xyz');
Similarly... you need to use [EMAIL PROTECTED]
now select user,host, password from user; returns 2 rows
jeff localhost
jeff % *4232432323
I think this is the problem - the following getConnection() method is
directed to the 2nd entry because it has a password, but it's not localhost
so my localhost-based Java app is denied.
In Java, I use:
DriverManager.getConnection( /localhost/tm , 'jeff','xyz' );
Then I get an authentication failed error.
Connector/J on 'nix types, only works via TCP/IP. Your app may be trying to
connect via unix socket. If the user/password fix does not work specify
127.0.0.1 in your connection setting (or even omit host since 127.0.0.1 is
default host value). Also, make sure your MySQL server is listening via
TCP/IP. If it is not, be sure to take the necessary security precautions
before doing so, and/or just enable TCP/IP on 127.0.0.1 (the user
[EMAIL PROTECTED] is valid for connections on 127.0.0.1).
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]