You are here:  » switching to another database at a new host.

Support Forum



switching to another database at a new host.

Submitted by rolli1 on Mon, 2009-06-08 16:49 in

Hi David,
is it neccessary to run the setup process again, when I use a db from another host?
I have several websites and the one I use mostly has only a 1 minute execution time for php scripts. Can I now use a db of another website for PT which has a longer execution time without running the setup process?

Regards

Roland

Submitted by support on Mon, 2009-06-08 18:43

Hello Roland,

If there is a PHP time limit, it won't make any difference which server the DB is on, the script will still stop at 1 minute; as it is all to do with PHP, not MySQL.

However, what I think you may be describing, is running a script on one host (that does not have the time limit) but talking the DB on another.

That would work, but it would depend on PHP being able to connect to the MySQL server running on the remote (other) host. In most cases, configuration / security policy / firewalls etc. prevent this from happening, but it's worth trying. All you need to do is change config.php to point to the old DB, so it would probably be a change from:

  $config_databaseServer = "localhost";

...to:

  config_databaseServer = "mysql1234.example.com";

Whilst you don't need to run setup.php again to install tables, you can always run it to show the database connection, authentication and table tests...

Cheers,
David.