coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: pols1337 on April 14, 2013, 02:07:10 AM

Title: Migrating Coppermine Gallery to another server
Post by: pols1337 on April 14, 2013, 02:07:10 AM
Hi,

I need help with moving my Coppermine installation from one host (a shared hosting environment, no Cpanel) to another host (virtual private server, with cPanel).  I can FTP the files over, so all of the pictures and images are the same.  But what do I do about the MySQL databases?  When I export / import from phpMyAdmin, it works ... except when I try to access my gallery, I get the following error:

Coppermine critical error:
Unable to connect to database !

MySQL said: Unknown MySQL server host 'mysql.gip.superb.net' (1)


Where mysql.gip.superb.net is the OLD location for the MySQL server.  I probably need to change it to localhost.  How do I do that on my existing Coppermine database?
Title: Re: Migrating Coppermine Gallery to another server
Post by: pols1337 on April 14, 2013, 02:08:26 AM
Actually I just realized I can probably change the [mysql.gip.superb.net] on the new host, no need to change on the old host and then export.  I just don't know where to look in the database. 

Please advise. 
Title: Re: Migrating Coppermine Gallery to another server
Post by: phill104 on April 14, 2013, 10:19:27 AM
The file /include/config.inc.php contains all your database details and you can adjust the pointer to your db in there.
Title: Re: Migrating Coppermine Gallery to another server
Post by: ΑndrĂ© on April 15, 2013, 10:41:38 AM
pols1337, it's all described in the docs:
Quote from: http://documentation.coppermine-gallery.net/en/export.htm#moving_serverEdit the database settings
Your new webhost must have provided you with the mySQL access data (you already had to use that data to restore the dump on the new server). That mySQL data usually will differ from the mySQL data on the old webserver, so you will have to edit the file that contains those data. Use a plain text editor (notepad.exe is fine) and edit include/config.inc.php: inside that file, you will find the old mySQL data that you will need to overwrite with the mySQL data for the new server.