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 database connection issue

Status
Not open for further replies.

koski757

Technical User
Aug 15, 2006
10
US
Long story short, a Linux server that was running FreeRADIUS for wireless authentication died. It was replaced with a new server (Server B), but Server A (also Linux), could no longer add/remove users via web interface on our Intranet. Web interface running Apache/Tomcat/Jakarta/Java.

When I try to add a new user, it says:
"There was an error adding the MAC Address to the database:
[Problem checking for duplicate MAC addresses
java.sql.SQLException: Cannot connect to MySQL server on b.b.b.b:3306. Is there a MySQL server running on the machine/port you are trying to connect to? (java.lang.NumberFormatException), HelpDesk::AddMAC::Insert: java.sql.SQLException: Cannot connect to MySQL server on b.b.b.b:3306. Is there a MySQL server running on the machine/port you are trying to connect to? (java.lang.NumberFormatException)]"

It acts like it doesn't connect to the db or even see the db, yet...

on server A:
ServerA.39390 ServerB.3306 5840 0 49640 0 ESTABLISHED
ServerA.39391 ServerB.3306 5840 0 49640 0 ESTABLISHED

on server B:
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 b.b.b.b:3306 a.a.a.a:39390 ESTABLISHED
tcp 0 0 b.b.b.b:3306 a.a.a.a:39391 ESTABLISHED

I am not sure if this is more a mysql issue or a java issue. I am assuming it is a java issue since mysql seems to work just fine. It does everything we need it to, but I am posting in mysql forum in case there is something I need to do with mysql. I have already create a user with full permission to the db. When I remove the user, I get different error messages.

Thank you in advance for any suggestions you may have.
 
Sounds like it might be the bind-address = 127.0.0.1 in the my.cnf file may need commented out (it's not commented out on a new install so only connections from localhost are allowed). Comment out bind-address, restart mysql, make sure that the web connection user exists and has rights from that IP or % inside mysql.
 
Kozusnik,
Thank you for the suggestion. I just confirmed that bind-address=127.0.0.1 is already commented out. I do have users from that ip set up in mysql. I have tried @computername, @ipaddress, etc to no avail.
 
Any firewall that may be blocking the port? Is server B set to listen for requests on that port?

Can you ping Server B on that port and get an answer?



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top