Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Wednesday, May 22 2013 @ 03:27 PM EDT


 Forum Index > Support > Installation Support New Topic Post Reply
 mysql_connect() failed. PHP / MYSQL issue?
   
rg1
 05/24/10 04:13PM (Read 1966 times)  
+----
Newbie

Status: offline


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

 
Profile Email Website
 Quote
rg1
 05/27/10 09:23AM  
+----
Newbie

Status: offline


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.


 
Profile Email Website
 Quote
justrage
 05/27/10 02:41PM  
+----
Newbie

Status: offline


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.


 
Profile Email Website
 Quote
Habitual
 05/28/10 01:57AM  
+++--
Chatty

Status: offline


Registered: 01/28/10
Posts: 39
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)

 
Profile Email
 Quote
Habitual
 05/28/10 01:58AM  
+++--
Chatty

Status: offline


Registered: 01/28/10
Posts: 39
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)

 
Profile Email
 Quote
Content generated in: 0.57 seconds
New Topic Post Reply

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