[Solved] DB connection failed after move to different server

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
tinodb

[Solved] DB connection failed after move to different server

Post by tinodb »

Hi,

I moved my site to a different server, and now I get a 'Database Connection Failed'.

old server:
PHP version  5.1.6
MySQL version 5.0.27-standard-log

new server:
PHP version  4.4.6
MySQL version 4.1.21-standard-log

DB and tables are all made (dumped sql and imported it) and acessable through ssh mysql -u etc. , and with this script that I can run from the homedirectory.

Code: Select all

<?php
include('config.php');

$db=mysql_connect ($config['db_hostname'], $config['db_username'], $config['db_password']) 
or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ($config['db_name']);
print 'no problems';

?>
So everything in config.php is right as well. It must be an CMSMS issue. Unfortunatly it does not give me any clues, also not when I turn on debugging in config.php.

Any suggestions?

ps. what is this variable in config.php for?:  $config['dbms'] = 'mysqli';
Last edited by tinodb on Thu May 03, 2007 2:07 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: DB connection failed after move to different server

Post by RonnyK »

Did you check the paths as well in the config.php. Did you install CMSMS on the new server in the same directory as on the original server?

Ronny
tinodb

Re: DB connection failed after move to different server

Post by tinodb »

I changed the paths yes.
And now I double-checked them :D

But what would that have to do with the DB access?
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: DB connection failed after move to different server

Post by tsw »

change mysqli to mysql

mysqli is a never mysql connection type and not supported everywhere

hope this helps
tinodb

Re: DB connection failed after move to different server

Post by tinodb »

Thank you tsw. That did it!

I was wondering what that variable was for.... :D
Locked

Return to “[locked] Installation, Setup and Upgrade”