Frank LaLone wrote:
I am having a nightmare of a time getting Red Hat 7.3 to connect to Mysql using the jdbc with jakarta-tomcat-4.1.12.I had to switch to a new dedicated service that went from Red Hat 7.2 to Red Hat 7.3 . Everything else is the exact same version of Java, Tomcat, and the jdbc connector. I can not get a connection, every time I try, I keep getting this message: SQLException: Server configuration denies access to data source SQLState: 08001 VendorError: 0 Example: http://www.wprs.org/examples/gateway/test.jsp?sessionID=LLLL I wont' even connect with my super user. I am totally stumped. I have to get this up and running, can anyone help me with this? I would really appreciate any input. Thank You Very Much Frank LaLone
I believe this issue is covered in the README that comes with the driver, but I'll summarize here, as RedHat is always a pain with respect to this, as they do have a somewhat 'broken' default install.
If your application is on the same server as your database, you're most likely running into the problem that RedHat maps the IP address 127.0.0.1 to 'localhost.localdomain', not 'localhost' as every other Unix does :(, which means you will need to add grants for connections from 'localhost.localdomain'.
Even if you do not connect to localhost, but some other IP address, you need to add grants to your database to allow connections from the IP address that your Java application runs on to the database you are trying to connect to.
For example (and use this only as an example, you need to read the grants section in the MySQL manual to make sure you are creating grants that have the appropriate level of security for your application), to add full grants for the user 'mark' connecting from 'foo.bar.com' to the database 'redhat' using the password 'greatsqldb', you would issue the following at the MySQL command prompt (logged in as the 'root' user or someone else who has grant privileges):
mysql> GRANT ALL PRIVILEGES ON redhat.* to 'mark'@'foo.bar.com' IDENTIFIED BY 'greatsqldb';
-Mark
--
For technical support contracts, visit https://order.mysql.com/?ref=mmma
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mark Matthews <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
/_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
<___/ www.mysql.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php