Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Sep 20, 2011 12:16 pm 
Offline
Senior Member
User avatar

Joined: Thu Jun 16, 2011 8:24 am
Posts: 412
Location: Cyberspace
I recently moved a live Drupal install to my Linode from another host. I had already copied the tables to my Linode's mysql server, and had adjusted the Drupal settings.php to point to my Linode. It worked fine connecting to my Linode's mysql from the other host, but after transferring the files and adjusting the DNS to point to my Linode, it starting outputting the following error:
Code:
    Warning: PDO::__construct(): [2002] Connection refused (trying to connect via tcp://database.youdolinux.com:3306) in DatabaseConnection->__construct() (line 304 of /srv/www/arklinux.org/html/includes/database/database.inc).
    Warning: PDO::__construct(): [2002] Connection refused (trying to connect via tcp://database.youdolinux.com:3306) in DatabaseConnection->__construct() (line 304 of /srv/www/arklinux.org/html/includes/database/database.inc).
    Warning: PDO::__construct(): [2002] Connection refused (trying to connect via tcp://database.youdolinux.com:3306) in DatabaseConnection->__construct() (line 304 of /srv/www/arklinux.org/html/includes/database/database.inc).
    Warning: PDO::__construct(): [2002] Connection refused (trying to connect via tcp://database.youdolinux.com:3306) in DatabaseConnection->__construct() (line 304 of /srv/www/arklinux.org/html/includes/database/database.inc).
    PDOException: SQLSTATE[HY000] [2002] Connection refused in lock_may_be_available() (line 164 of /srv/www/arklinux.org/html/includes/lock.inc).

The strange problem here is that settings.php is no longer pointing to database.youdolinux.com, I already changed it to localhost. I tried changing it back with no joy.

I currently have a temporary makeshift web page showing up for the site, but the Drupal version is so much better.

EDIT: I have already double checked that settings.php has the correct database, mysql user, and mysql password.

_________________
Kris the Piki Geeker


Top
   
 Post subject:
PostPosted: Tue Sep 20, 2011 2:42 pm 
Offline
Senior Member
User avatar

Joined: Thu Jun 16, 2011 8:24 am
Posts: 412
Location: Cyberspace
It seems that there are two sections of settings.php for database configuration. One section is a single line giving the database info, and the other section is the same database info, except on separate lines. The one that was on separate lines had the wrong info. Fixing it fixed the problem.

I never saw that multi-line section before, and never had to modify it in the past...

_________________
Kris the Piki Geeker


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group