Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
2 registered members (Gizmo, mmkk), 69 guests, and 416 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
Mark S
Mark S
Liverpool : England : UK
Posts: 4,704
Joined: July 2006
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 16
FREAK 11
M4TT 11
Ruben 6
mmkk 5
isaac 4
Latest Photos
Chinese Buddhist temple.
My buddha beads.
Rendered Walls
Multi-Screen wallpaper
Stockholm Metro
Previous Thread
Next Thread
Print Thread
Help with my mysql connectivity brain fart... #243979
06/20/11 01:14 PM
06/20/11 01:14 PM
Joined: Sep 2008
Posts: 82
Utah
bakerzdosen Offline OP
journeyman
bakerzdosen  Offline OP
journeyman
Joined: Sep 2008
Posts: 82
Utah
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.

Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: Help with my mysql connectivity brain fart... [Re: bakerzdosen] #243980
06/20/11 01:24 PM
06/20/11 01:24 PM
Joined: Dec 2003
Posts: 5,825
Lutz,FL
Ruben Offline

Ruben  Offline


Joined: Dec 2003
Posts: 5,825
Lutz,FL
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/11 04:27 PM
06/20/11 04:27 PM
Joined: Sep 2008
Posts: 82
Utah
bakerzdosen Offline OP
journeyman
bakerzdosen  Offline OP
journeyman
Joined: Sep 2008
Posts: 82
Utah
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/11 04:38 PM
06/20/11 04:38 PM
Joined: Dec 2003
Posts: 5,825
Lutz,FL
Ruben Offline

Ruben  Offline


Joined: Dec 2003
Posts: 5,825
Lutz,FL
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/11 04:38 PM
06/20/11 04:38 PM
Joined: Sep 2008
Posts: 82
Utah
bakerzdosen Offline OP
journeyman
bakerzdosen  Offline OP
journeyman
Joined: Sep 2008
Posts: 82
Utah
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/11 08:22 AM
06/21/11 08:22 AM
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
R
Rick Offline
Former Developer
Rick  Offline
Former Developer
R
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
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.


Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Users Unable to Upload Avatar
by M4TT. 12/13/17 08:51 AM
Shout Box Sound Effect
by M4TT. 11/29/17 08:28 PM
Ad island
by TGCsanderson. 11/25/17 06:41 PM
Taking to long to connect to DB
by AstroCat. 11/24/17 12:34 PM
Forum Statistics
Forums36
Topics35,015
Posts190,535
Members12,045
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.1
(Snapshot build 20171106)