Previous Thread
Next Thread
Print Thread
Hop To
Joined: Sep 2008
Posts: 82
journeyman
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.

Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Sep 2008
Posts: 82
journeyman
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).

Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Sep 2008
Posts: 82
journeyman
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.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Ruben), 476 guests, and 111 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)