forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: Uzma on May 28, 2011, 04:42:45 pm

Title: mySQL error?
Post by: Uzma on May 28, 2011, 04:42:45 pm
Hello,
I just moved my gallery from one host to another. I'm getting the following error:

Quote
Coppermine critical error:
Unable to connect to database !

MySQL said: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)

I've tried to find this mysql.sock file but it's nowhere to be found. Can someone help me? Thanks in advance.

The link to the site is: http://ramkapoorrocks.com/gallery

Title: Re: mySQL error?
Post by: RaptorUK on May 28, 2011, 06:07:23 pm
Hello,
I just moved my gallery from one host to another.


It would probably help if you explained what steps you took to move your gallery to a new host.  For example if you just copied the files across then it won't work . . .
Title: Re: mySQL error?
Post by: Uzma on May 29, 2011, 10:09:42 pm
I backed up the database, all the files in the directories. Uploaded the files to the new server/domain, restored the database, changed the config file to match the new database info (username and password). I had done the same once before to move the gallery (different site) and it had worked perfectly without any issues.
Title: Re: mySQL error?
Post by: lurkalot on May 30, 2011, 01:30:12 pm
I backed up the database, all the files in the directories. Uploaded the files to the new server/domain, restored the database, changed the config file to match the new database info (username and password). I had done the same once before to move the gallery (different site) and it had worked perfectly without any issues.

Normally you would use the export function in phpmyadmin to export the old database, then create a new empty database on the new server. (make sure config.inc.php file is set to it)   Then import that data to the new database, using phpmyadin import function.
Title: Re: mySQL error?
Post by: Uzma on May 30, 2011, 04:35:38 pm
Yes, that's exactly what I did. Exported, then imported.

I've just never gotten this sort of an error before. there's no mysql.sock file anywhere.
Title: Re: mySQL error?
Post by: Αndré on May 31, 2011, 12:31:38 pm
Double post ::) Question already answered here: http://forum.coppermine-gallery.net/index.php/topic,72576.msg350602.html#msg350602