Page 1 of 1

[Solved] DB connection failed after move to different server

Posted: Thu May 03, 2007 11:03 am
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';

Re: DB connection failed after move to different server

Posted: Thu May 03, 2007 11:14 am
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

Re: DB connection failed after move to different server

Posted: Thu May 03, 2007 11:27 am
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?

Re: DB connection failed after move to different server

Posted: Thu May 03, 2007 11:30 am
by tsw
change mysqli to mysql

mysqli is a never mysql connection type and not supported everywhere

hope this helps

Re: DB connection failed after move to different server

Posted: Thu May 03, 2007 2:06 pm
by tinodb
Thank you tsw. That did it!

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