coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: ogwasabi on September 09, 2006, 12:06:43 AM

Title: Error when running sql statement
Post by: ogwasabi on September 09, 2006, 12:06:43 AM
I'm having trouble recreating my database on my new host. I updated my gallery on my old host and dumped the data into an sql file. I have uploaded all my pictures and recreated the gallery (both galleries where v1.4.9) but I get the following error code when trying to run the sql statement on my new host.

#1136 Column count doesn't match row count at row 1

My guess is this has something to do with a difference in the number of columns in the table on my db and the number of values I have in my sql string for that particular line. I got this sql statement from a dump of my old db that was updated to v1.4.9 though. Why am I getting this error and what can I do to fix it? Thanks.

Title: Re: Error when running sql statement
Post by: Nibbler on September 09, 2006, 12:11:08 AM
A fresh install of 1.4.9 won't have the same database structure as one that has been updated from previous versions. You should import both the data and structure from the backup.
Title: Re: Error when running sql statement
Post by: ogwasabi on September 09, 2006, 12:16:23 AM
I see, that would mean that I need to also install the files/sub directories from v1.1 or whatever I was using before. Run the sql statement. Then go through the upgrade process?
Title: Re: Error when running sql statement
Post by: Nibbler on September 09, 2006, 12:20:04 AM
Nothing to do with files. Just dump the data and structure from the database and then import them together.
Title: Re: Error when running sql statement
Post by: ogwasabi on September 09, 2006, 12:28:34 AM
I think I understand but perhaps I'm a little slow. Forgive me. When you say structure, what are you refering to? I know that when I installed v1.4.9 it created tables in my db starting with cpg149. All the tables/data in my dump file start with cpg11d. Do I need to dump my files on the new db that begin with cpg149 and then run the sql statement to recreate the db? Should I blow away the gallery on my new host, run the sql statement then re-install the gallery?
Title: Re: Error when running sql statement
Post by: Nibbler on September 09, 2006, 12:35:08 AM
Follow the moving instructions at http://coppermine-gallery.net/demo/cpg14x/docs/faq.htm#moveGallery

Then update the gallery as normal once it has been moved.
Title: Re: Error when running sql statement
Post by: ogwasabi on September 09, 2006, 01:15:28 AM
I now get an error message when trying to access the gallery

While executing query "SELECT * FROM cpg149_config" on 0

mySQL error: Table 'ws40.cpg149_config' doesn't exist
Title: Re: Error when running sql statement
Post by: Nibbler on September 09, 2006, 01:25:04 AM
You need to make sure include/config.inc.php contains the correct information to access the db coppermine is in.
Title: Re: Error when running sql statement
Post by: ogwasabi on September 09, 2006, 02:58:04 AM
Thanks. It's working now.