Welcome to Geeklog, Anonymous Thursday, May 23 2024 @ 11:57 pm EDT

Geeklog Forums

server crashed trying to restore my environment cant connect to mysql


Status: offline

rg1

Forum User
Newbie
Registered: 10/06/02
Posts: 10
Hello everyone...

Im having a hardware issue with my server, so I basically have a fresh FC12 box up and running. I was previously running FC4.
My mysql DB server is still up, and my database is intact. I have a copy of my public_html and I restored that to my new server. I believe Im running version 1.3

When I attempt to hit my site, Im getting this error:

Cannot connect to DB server (shows up in browser)

I see this in the log:

[Sun May 23 21:31:57 2010] [error] [client 10.2.0.23] PHP Warning: mysql_connect(): Can't connect to MySQL server on '10.1.0.15' (13) in /var/www/geeklog/system/databases/mysql.class.php on line 112

I suspect that I may be running a newer version of PHP and not sure if this is what could be causing the issue as well as whatever distro of apache.

I can validate that I can connect to mysql via command line and the account credentials are working:

mysql -h 10.1.0.15 geeklog -u geeklog -p
Enter password:
Reading table information for completion of table and column names

I would really appreciate if anyone can offer some assitance. I also have other php related sites that arent working, which is why I am leaning towards this being a php issue. I am going through the php.ini to see if all the settings are correct for GL to work...

If anyone has any ideas...your input is really appreciated..

Thanks...

-Rob
 Quote

Status: offline

rg1

Forum User
Newbie
Registered: 10/06/02
Posts: 10
I checked the old server httpd configs and it appears I was running php5 (not sure about exact version).

Im doing a tcpdump on my webserver and hitting the GL site, and I dont see any attempted connections to the mysql server.

 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
You did check the db-config.php, did you? If you took it from a backup it might be old or empty.
 Quote

rg1

Anonymous
Quote by: 1000ideen

You did check the db-config.php, did you? If you took it from a backup it might be old or empty.



the config.php is fine. I restored files from the other server. I suspect its something with apache now. I cant get simple mysql_connect() test script to work.
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
O.k., that`s why I don`t touch servers :wink: I only have reseller accounts
 Quote

Status: offline

rg1

Forum User
Newbie
Registered: 10/06/02
Posts: 10
I blew away the server...reinstalled FC12. removed all RPMs for httpd* mysql* php* and compiled everything from source. I have tested that I can now connect to remote sql server. Prior to this, I did try to install all RPMs for httpd* mysql* php*, however this did not resolve mysql_connect() issue.

I suspect that I should not have any issues restoring / upgrading my GL install.
 Quote

All times are EDT. The time is now 11:57 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content