Welcome to Geeklog, Anonymous Friday, October 11 2024 @ 11:35 pm EDT

Geeklog Forums

mysql_connect() failed. PHP / MYSQL issue?


Status: offline

rg1

Forum User
Newbie
Registered: 10/06/02
Posts: 10
This may not be the appropriate place to ask this question, however since it is affected my GL install, it may. I just build a brand new FC12 server.
Im trying to copy over my GL 1.3 config to it. The mysql is running on a separate server. I am able to hit the mysql server form the command line with mysql -h, however I keep getting cant connect to db on website. I dont think the issue is specific to GL, because my test mysql_connect() script is failing too. Im not sure what is going on. PHP itself is working, I see that the mysql.ini is being parsed, but I dont see mysql in list of loaded modules.

Not sure where to go from here...

apache2.2.14
PHP 5.3.2
GL 1.3

Thanks..

-Rob
 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.

 Quote

Status: offline

justrage

Forum User
Newbie
Registered: 06/23/07
Posts: 10
Can you access the server from another site? I would suggest making a quick sql query / db connection string in a test file and see if that can connect to confirm if its the DB, webserver or geeklog.

 Quote

Status: offline

Habitual

Forum User
Chatty
Registered: 01/28/10
Posts: 54
Location:Yawnstown, Oh. USA
Quote by: justrage

Can you access the server from another site? I would suggest making a quick sql query / db connection string in a test file and see if that can connect to confirm if its the DB, webserver or geeklog.



<?php
$link = mysql_connect('hostname.com', 'username', 'password'Wink;
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully' ;
mysql_close($link);
?>

save and exit

php -f file.php (enter)
 Quote

Status: offline

Habitual

Forum User
Chatty
Registered: 01/28/10
Posts: 54
Location:Yawnstown, Oh. USA
Quote by: justrage

Can you access the server from another site? I would suggest making a quick sql query / db connection string in a test file and see if that can connect to confirm if its the DB, webserver or geeklog.



<?php
$link = mysql_connect('hosname.com', 'username', 'password'Wink;
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully' ;
mysql_close($link);
?>

save and exit

php -f file.php (enter)
 Quote

All times are EDT. The time is now 11:35 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