3 messages in com.mysql.lists.javaRe: localhost.localdomain not allowed...| From | Sent On | Attachments |
|---|---|---|
| Eric Wulff | 01 Oct 2004 14:13 | |
| Mark Matthews | 01 Oct 2004 14:28 | |
| Eric Wulff | 01 Oct 2004 15:37 |
| Subject: | Re: localhost.localdomain not allowed to connect![]() |
|---|---|
| From: | Mark Matthews (ma...@mysql.com) |
| Date: | 10/01/2004 02:28:22 PM |
| List: | com.mysql.lists.java |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Eric Wulff wrote:
Hi all, I'm trying to run a java program, listed below, which creates some tables in the test db of MySQL. The program is unable to connect to the DB with the exception listed below. Can someone tell me why this is happening and how to fix it or point me to the docs covering the issue? I've scoured the MySQL docs so please refer to what I've already tried before pointing me here. Thx.
please see below for the things I've already tried, my system info, and a listing of the .java file.
many thx Eric
Eric,
Hopefully you didn't miss this section from the troubleshooting section of the Connector/J docs at http://dev.mysql.com/doc/connector/j/en/index.html#id2488240:
"GRANT ALL PRIVILEGES ON [dbname].* to '[user]'@'[hostname]' identified by '[password]'
replacing [dbname] with the name of your database, [user] with the user name, [hostname] with the host that MySQL Connector/J will be connecting from, and [password] with the password you want to use.
Be aware that RedHat Linux is broken with respect to the hostname portion for the case when you are connecting from localhost. You need to use "localhost.localdomain" for the [hostname] value in this case. Follow this by issuing the "FLUSH PRIVILEGES" command. "
-Mark
- -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 332 0507 www.mysql.com
MySQL Guide to Lower TCO http://www.mysql.com/it-resources/white-papers/tco.php -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBXcwLtvXNTca6JD8RAqNIAKCuz885nU22aug40zHvGNW/AJ/J7wCgiUXV nDMvhEEz1wuoVJOnv4dIp5I= =U3uf -----END PGP SIGNATURE-----




