Database from 1.4.25 to 1.5.0 ? Database from 1.4.25 to 1.5.0 ?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Database from 1.4.25 to 1.5.0 ?

Started by Sixkiller, August 09, 2011, 08:32:27 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Sixkiller

Hi there.

Can you help me ? I have a database from my old gallery on version 1.4.25. The problem come when i try to upload my database file on the new gallery - 1.5.X. Can you tell me how can i make my database to work on the new version ?

I also tried to install 1.4.25, upload database, then make an update, but when i try to install the old version it appears:


mySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM COMMENT='Used to store sessions'' at line 7 on query ' CREATE TABLE IF NOT EXISTS cpg14x_sessions ( session_id varchar(40) NOT NULL default '', user_id int(11) default '0', time int(11) default NULL, remember int(1) default '0', PRIMARY KEY (session_id) ) TYPE=MyISAM COMMENT='Used to store sessions''


So can you give me another way to make my gallery work ?

Thanks.

Αndré

So you're currently not able to import your database dump to your MySQL server, right? Actually this is beyond Coppermine support, but it seems that your new MySQL server doesn't like the
QuoteTYPE=MyISAM
part. Just remove all occurrences in your dump and try to import that file.

Sixkiller

Hi there ! Thanks ! I've installed the latest version of Coppermine. Then i've uploaded my databse. I'm going to admin menu and clicking "Update databse". Please, see the following list:


CREATE TABLE IF NOT EXISTS `cpg15x_categorymap` ( cid int(11) NOT NULL, group_id int(11) NOT NULL, PRIMARY KEY (cid,group_id) ) COMMENT='Holds the categories where groups can create albums' Already Done
CREATE TABLE cpg15x_temp_messages ( message_id varchar(80) NOT NULL default '', user_id int(11) default '0', time int(11) default NULL, message text NOT NULL, PRIMARY KEY (message_id) ) COMMENT='Used to store messages from one page to the other' Already Done
ALTER TABLE cpg15x_filetypes DROP INDEX `EXTENSION`, ADD PRIMARY KEY ( `extension` ) Already Done
ALTER TABLE cpg15x_filetypes ADD `player` VARCHAR( 5 ) Already Done
ALTER TABLE cpg15x_filetypes CHANGE `mime` `mime` CHAR(254) default NULL Already Done
INSERT INTO cpg15x_filetypes VALUES ('001', 'application/001', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('7z', 'application/7z', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('arj', 'application/arj', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('bz2', 'application/bz2', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('cab', 'application/cab', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('lzh', 'application/lzh', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('rpm', 'application/rpm', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('tar', 'application/tar', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('z', 'application/z', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('odb', 'application/vnd.oasis.opendocument.database', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('odt', 'application/vnd.oasis.opendocument.text', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('ods', 'application/vnd.oasis.opendocument.spreadsheet', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('odp', 'application/vnd.oasis.opendocument.presentation', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('odg', 'application/vnd.oasis.opendocument.graphics', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('odc', 'application/vnd.oasis.opendocument.chart', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('odf', 'application/vnd.oasis.opendocument.formula', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('odi', 'application/vnd.oasis.opendocument.image', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('odm', 'application/vnd.oasis.opendocument.text-master', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('ott', 'application/vnd.oasis.opendocument.text-template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('ots', 'application/vnd.oasis.opendocument.spreadsheet-template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('otp', 'application/vnd.oasis.opendocument.presentation-template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('otg', 'application/vnd.oasis.opendocument.graphics-template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('otc', 'application/vnd.oasis.opendocument.chart-template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('otf', 'application/vnd.oasis.opendocument.formula-template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('oti', 'application/vnd.oasis.opendocument.image-template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('oth', 'application/vnd.oasis.opendocument.text-web', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('sxw', 'application/vnd.sun.xml.writer', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('stw', 'application/vnd.sun.xml.writer.template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('sxc', 'application/vnd.sun.xml.calc', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('stc', 'application/vnd.sun.xml.calc.template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('sxd', 'application/vnd.sun.xml.draw', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('std', 'application/vnd.sun.xml.draw.template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('sxi', 'application/vnd.sun.xml.impress', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('sti', 'application/vnd.sun.xml.impress.template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('sxg', 'application/vnd.sun.xml.writer.global', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('sxm', 'application/vnd.sun.xml.math', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('docm', 'application/vnd.ms-word.document.macroEnabled.12', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('dotx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('dotm', 'application/vnd.ms-word.template.macroEnabled.12', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('xlsm', 'application/vnd.ms-excel.sheet.macroEnabled.12', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('xltx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('xltm', 'application/vnd.ms-excel.template.macroEnabled.12', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('xlsb', 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('xlam', 'application/vnd.ms-excel.addin.macroEnabled.12', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('pptx', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('pptm', 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('ppsx', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('ppsm', 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('potx', 'application/vnd.openxmlformats-officedocument.presentationml.template', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('potm', 'application/vnd.ms-powerpoint.template.macroEnabled.12', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('ppam', 'application/vnd.ms-powerpoint.addin.macroEnabled.12', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('sldx', 'application/vnd.openxmlformats-officedocument.presentationml.slide', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('sldm', 'application/vnd.ms-powerpoint.slide.macroEnabled.12', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('thmx', 'application/vnd.ms-officetheme', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('onetoc', 'application/onenote', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('onetoc2', 'application/onenote', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('onetmp', 'application/onenote', 'document', '') Already Done
INSERT INTO cpg15x_filetypes VALUES ('onepkg', 'application/onenote', 'document', '') Already Done
INSERT INTO cpg15x_config VALUES ('global_registration_pw','') Already Done
INSERT INTO cpg15x_config VALUES ('picinfo_movie_download_link', '1') Already Done
INSERT INTO cpg15x_config VALUES ('site_token', MD5(RAND())) Already Done
INSERT INTO cpg15x_config VALUES ('form_token_lifetime', '900') Already Done
INSERT INTO cpg15x_config VALUES ('rating_stars_amount', '5') Already Done
INSERT INTO cpg15x_config VALUES ('old_style_rating', '0') Already Done
INSERT INTO cpg15x_config VALUES ('enable_watermark', '0') Already Done
INSERT INTO cpg15x_config VALUES ('where_put_watermark', 'southeast') Already Done
INSERT INTO cpg15x_config VALUES ('watermark_file', 'images/watermark.png') Already Done
INSERT INTO cpg15x_config VALUES ('which_files_to_watermark', 'both') Already Done
INSERT INTO cpg15x_config VALUES ('orig_pfx', 'orig_') Already Done
INSERT INTO cpg15x_config VALUES ('watermark_transparency', '40') Already Done
INSERT INTO cpg15x_config VALUES ('reduce_watermark', '0') Already Done
INSERT INTO cpg15x_config VALUES ('watermark_transparency_featherx', '0') Already Done
INSERT INTO cpg15x_config VALUES ('watermark_transparency_feathery', '0') Already Done
INSERT INTO cpg15x_config VALUES ('enable_thumb_watermark', '1') Already Done
INSERT INTO cpg15x_config VALUES ('enable_unsharp', '0') Already Done
INSERT INTO cpg15x_config VALUES ('unsharp_amount', '120') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('italian', 'Italian','Italiano','it','it', 'YES', 'YES') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('japanese', 'Japanese','日本語','jp','jp', 'YES', 'YES') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('kazakh', 'Kazakh','','kz','', 'NO', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('korean', 'Korean','한국어','kr','', 'NO', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('kurdish', 'Kurdish','كوردی','kurdish','', 'NO', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('kyrgyz', 'Kyrgyz','','kg','', 'NO', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('laothian', 'Laothian ','','la','', 'NO', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('latvian', 'Latvian','Latvian','lv','', 'NO', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('lithuanian', 'Lithuanian','Letzeburgisch','lu','', 'NO', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('luxembourgish', 'Luxembourgish','Lietuviškai','lt','', 'YES', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('macedonian', 'Macedonian','Македонски','mk','', 'NO', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('malay', 'Malay','Bahasa Melayu','my','', 'NO', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('maltese', 'Maltese','','mt','', 'NO', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('mongolian', 'Mongolian','','mn','', 'NO', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('nepali', 'Nepali','','np','', 'NO', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('norwegian', 'Norwegian','Norsk','no','no', 'YES', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('persian', 'Persian','فارسی','ir','', 'NO', 'NO') Already Done
INSERT INTO cpg15x_languages (lang_id, english_name, native_name, flag, abbr, available, complete) VALUES ('polish',

Update completed

It's recommended to check your file versions if you just upgraded from an older version of Coppermine. If you didn't (or you don't want to check), you can go to your gallery's start page.

... and more info, but there is limit 25 000 symbols...

I've places the old files at albums/userpics.

But there is still nothing on gallery - it's empty. Not a photos, user names etc.

Also, what file i need to edit and where it is placed (TYPE=MyISAM) ?

Αndré

Please explain exactly how and where you "uploaded" your database.

Sixkiller

Ok.

1. I've been hosting my gallery at freehost. They gave me the userpics folder and they had also gave me a database file (~ 3.5 megabytes). It was too large for phpmyadmin to uplaod, so I have zipped the file to upload it.

2. I have a virtual server which running system xampp. Everything is fine, there are also some sites in the server like virtual server, forum, other coppermine gallery, e107 CMS etc.

3. I'm uploading the database via phpmyadmin from "Import" tool.

Look at the picture: http://store.picbg.net/pubpic/A2/F2/814a075f879ba2f2.JPG

Αndré

Quote from: Sixkiller on August 10, 2011, 09:04:47 PM
I have zipped the file to upload it
Unzip that file, then remove all occurrences of
QuoteTYPE=MyISAM
save the file and zip it again. Now it should be possible to import that file without errors.

Sixkiller

Ok. I have tried. Open the .sql, then find 10-15 rows:

) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=32
And like that, but all start with ENGINE=MyISAM..

I've deleted it. Then make .zip and import, but...

http://store.picbg.net/pubpic/2E/A4/67fb7a929c262ea4.JPG

Do i need to install the whole gallery again to make a new database and then to upload the old database?

Αndré

Please attach your dump file to your next post (I want to test if it works for me). And please stop to use that horrible slow image hosting page. Instead, just attach the pictures to your posts.

Sixkiller

Sure, excuse me. I forgot that site is quiet slow abroad.... anyway.

Here you the database (dump):

artistsinhawaii

#9
Silly question, perhaps, but are you using the same config.inc.php file from your CPG 1.4.25 install?

The file is in your gallery's 'include' folder.

From the JPG file it looks like you did not follow the installation directions and replaced your config.inc.php file.  You need to replace that with the original and run the update database routine.
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

Αndré

At first we need to successfully import the old database. As far as I understood it still doesn't work. Please try the attached dump of your database.

artistsinhawaii

Andre,

That's what I thought, too, but looking at the far, left-hand column of the PhpMyAdmin jpg he provided ( http://store.picbg.net/pubpic/A2/F2/814a075f879ba2f2.JPG ), all of his database entries are duplicated... one set has the "cCpg15x_" prefix.. the other simply has "cpg_" .


Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

Sixkiller

Quote from: madeinhawaii on August 11, 2011, 12:38:09 AM
Silly question, perhaps, but are you using the same config.inc.php file from your CPG 1.4.25 install?

The file is in your gallery's 'include' folder.

From the JPG file it looks like you did not follow the installation directions and replaced your config.inc.php file.  You need to replace that with the original and run the update database routine.

As i said, i was at a freehost. They just give me the database and userpics and that was all. I can not take anything old.

Andre, i've tried to import it, but look at the error:


Error

SQL query:

-- -- Dumping data for table `cpg_albums` -- INSERT INTO `cpg_albums` (`aid`, `title`, `description`, `visibility`, `uploads`, `comments`, `votes`, `pos`, `category`, `thumb`, `keyword`, `alb_password`, `alb_password_hint`) VALUES (1, 'АвÑ,обуси Икарус', '', 0, 'YES', 'YES', 'YES', 100, 12, 0, '', '', ''), (2, 'АвÑ,обуси Чавдар', '', 0, 'YES', 'YES', 'YES', 101, 12, 0, '', '', ''), (3, 'АвÑ,обуси МАН', '', 0, 'YES', 'YES', 'YES', 102, 12, 0, '', '', ''), (4, 'АвÑ,обуси Мерцедес', '', 0, 'YES', 'YES', 'YES', 103, 12, 0, '', '', ''), (5, 'АвÑ,обуси СеÑ,ра', '', 0, 'YES', 'YES', 'YES', 104, 12, 0, '', '', ''), (6, 'Тролейбуси ЗиУ', '', 0, 'YES', 'YES', 'YES', 100, 5, 0, '', '', ''), (7, 'ПроÑ,оÑ,ипен Ñ,Ñ�[...]

MySQL said: Documentation
#1062 - Duplicate entry '1' for key 'PRIMARY'

Αndré

That's exactly what madeinhawaii said. It seems that you already imported your database. Clear your whole database (to remove any inconsistent/incomplete data) and try to import that file again.

Sixkiller

^done. but:

SQL query:

-- -------------------------------------------------------- -- -- Table structure for table `cpg_pictures` -- CREATE TABLE IF NOT EXISTS `cpg_pictures` ( `pid` int(11) NOT NULL auto_increment, `aid` int(11) NOT NULL default '0', `filepath` varchar(255) NOT NULL default '', `filename` varchar(255) NOT NULL default '', `filesize` int(11) NOT NULL default '0', `total_filesize` int(11) NOT NULL default '0', `pwidth` smallint(6) NOT NULL default '0', `pheight` smallint(6) NOT NULL default '0', `hits` int(10) NOT NULL default '0', `mtime` datetime NOT NULL default '0000-00-00 00:00:00', `ctime` int(11) NOT NULL default '0', `owner_id` int(11) NOT NULL default '0', `owner_name` varchar(40) NOT NULL default '', `pic_rating` int(11) NOT NULL default '0', `votes` int(11) NOT NULL default '0', `title` varchar(255) NOT NULL default '', `caption` text NOT NULL, `keywords` varchar(255) NOT NULL default '', `approved` enum('YES','NO') NOT NULL default 'NO', [...]

MySQL said: Documentation
#1214 - The used table type doesn't support FULLTEXT indexes


You know people, thank you. You have advised me to delete old database, then to upload the new one. Ok, but in the server there was also installed e107 site (site, gallery, forum ETC>) and i've made a SERIOUS mistake - i've dropped my site database. I have only a backup sine April 2011. I don't know what to do. So thank you, please lock the topic - I think I won't use gallery next couple of months/years etc.

Αndré

Please don't make us responsible that you deleted important data. We're also not responsible that you don't have a backup plan.

Quote from: Sixkiller on August 11, 2011, 02:00:46 PM
please lock the topic - I think I won't use gallery next couple of months/years etc.
Fine by me, but I don't know how this solves your data loss.


PS: You should consider of changing the hosting type, as running XAMPP is probably the worst choice for an production web server. There are hosting packages that include periodic backups etc.

artistsinhawaii

Sixkiller,

Isn't all that information in your last 'dump' of the database?
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.