Previous Thread
Next Thread
Print Thread
Hop To
Help with my mysql connectivity brain fart... #243979 06/20/2011 1:14 PM
Joined: Sep 2008
Posts: 82
bakerzdosen Offline OP
journeyman
OP Offline
journeyman
Joined: Sep 2008
Posts: 82
Long story short: We're moving to a new physical server. It's running CentOS (as is the current one.)

I copied the httpd.conf and my.cnf files over, the entire htdocs directory, and ran a backup of the db. On the new system, I installed the "old" conf files, restarted the services, changed the root user password in mysql and then added the user/password we're using for ubb to connect to the db. I restored the backup sql file. I did a grant (in fact, I granted all *.* to that user just to test) for that user.

Using the username/password combo I created, I can log in from the command line, use the ubb mysql db, and the selects that I have run (eg select count(*) from ubbt_POSTS) have all returned exactly as expected.

Now, with that said, I'm still getting "Unable to connect to database server, please try again in a few minutes." when I try to use ubb (the rest of the website works fine and I've made an entry for the site in my hosts file). If I point UBB at my dev database (after poking a hole in the firewall) it works fine. So, all signs point to something I somehow screwed up on the new server with mysql (5.0.77 if it matters). However, I'm just not seeing it...

Anyone?

I seem to remember a way to turn on additional error logging from a config file, but I'm not sure that would help here, and I don't remember how anyway.

Re: Help with my mysql connectivity brain fart... [Re: bakerzdosen] #243980 06/20/2011 1:24 PM
Joined: Dec 2003
Posts: 5,994
Ruben Online Yawn
Online Yawn
Joined: Dec 2003
Posts: 5,994
You need to edit the paths/user/pasword in the includes/config.inc.php file.
most of it is the top couple of lines. Then that should get you running enough to open the control panel.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Help with my mysql connectivity brain fart... [Re: Ruben] #243983 06/20/2011 4:27 PM
Joined: Sep 2008
Posts: 82
bakerzdosen Offline OP
journeyman
OP Offline
journeyman
Joined: Sep 2008
Posts: 82
Originally Posted by Ruben
You need to edit the paths/user/pasword in the includes/config.inc.php file.
most of it is the top couple of lines. Then that should get you running enough to open the control panel.
That's actually how I was able to connect to the "dev" database as I mentioned. When I moved it back to "localhost" it continued giving me the same error. I didn't change the username/password from the original server (yet). I simply added the user/pass (and the applicable grants) to the new mysqld instance.

That hasn't helped, but thanks. (For the record, I actually have tried the root user/pass combo in that file with the same results.)

And also for the record, running phpinfo() in a file gives basically identical results - at least where it matters. The one potential difference is in the mysql.default_socket setting isn't set (no value) in the new server - but I'm pretty sure that can be attributed to not being able to connect to mysql.

Looking at this, it seems that the issue has got to be with mysql or php. Yet, the my.cnf file is the same one from production (aka the port is correct.) I can connect from the command line (and I've changed them a few times) using both the ubbthreads user as well as root, so I doubt it's the user/pass combo. The instance is running in the same OS as apache/php so I don't think it's somehow denying connections based on it being remote.

bind-address is not set in the my.cnf file.

nsswitch.conf is (correctly) set to "files dns" for hosts.

umask is at 22.

I tar'd the htdocs folder, so permissions are the same (I made sure the userid's lined up for apache and mysql.)

Also, we have several domains pointing at our webserver. In our current production setup, the when you hit the forums, it redirects you to a certain domain (also set up in the config.inc.php file). That is not happening here. I get the error regardless of which domain I attempt to utilize and yet never get redirected. However, the sessions directory is registering new sessions whenever I hit the main ubb page.

I dunno - there has got to be some little tidbit I'm missing here (obviously).

Re: Help with my mysql connectivity brain fart... [Re: bakerzdosen] #243984 06/20/2011 4:38 PM
Joined: Dec 2003
Posts: 5,994
Ruben Online Yawn
Online Yawn
Joined: Dec 2003
Posts: 5,994
Well if you never enabled the mysql error logs in ubb,you will get that generic message but no detail files to view in the folder it would be stored in.

If there are any helpful details.

There is a cheat however to see if it is reporting anything specific.
Edit libs/mysql.inc.php.
search for $showerror=0
change that value to 1.
if there is any additional errors reported it will appear in the browser.

Just note though when done change it back to 0.
because all users will see the details.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Help with my mysql connectivity brain fart... [Re: bakerzdosen] #243985 06/20/2011 4:38 PM
Joined: Sep 2008
Posts: 82
bakerzdosen Offline OP
journeyman
OP Offline
journeyman
Joined: Sep 2008
Posts: 82
OK, it actually WAS the my.cnf file. (Weird.) I put the original one back in and suddenly I'm in.

Thanks anyway.

Sheesh.

Oh well, now I get to go through and re-customize my my.cnf file. Probably for the best.

Re: Help with my mysql connectivity brain fart... [Re: bakerzdosen] #243989 06/21/2011 8:22 AM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
You may have had, or not had, the skip-networking line in your my.cnf. Depending on your setup on the new server, that would cause the issue you were experiencing, so when re-customizing your .cnf file watch for that line. This looked to be a connectivity issue rather than a username/password issue.


Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Followed List v7.7.2 Question
by Ruben - 11/12/2019 12:22 PM
UBB Dev
by JAISP - 11/03/2019 11:01 AM
Exceeded Number of attachments
by rbrtgrmn - 11/02/2019 9:57 PM
Forum New User Registration
by kf6zpl - 10/25/2019 10:45 AM
Having issue with redirects to UBB classic URLs
by amciotola - 10/16/2019 12:11 AM
Who's Online Now
4 registered members (Ruben, isaac, Gizmo, JAISP), 85 guests, and 408 spiders.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20191023)