error message when importing sql

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
newvision
Forum Members
Forum Members
Posts: 77
Joined: Wed Jun 10, 2009 11:57 am

error message when importing sql

Post by newvision »

I am running CMSMS 1.11.8 using the WAMP sever on a local machine. I created an export dump from phpMyAdmin to upload to the server once I installed CMSMS 1.11.8. I set up the database, etc on the server but wan not able to install cmsms. I kept getting an error message that I could not connect with the database. Their tech support people proceeded to install in a different location changing my datbase names, username and password, etc.

I asked them to unstall in tht location and install where I asked them to. Long story short, I was not able to import my sql dump file. AND I was not able to go back to the WAMP file becasue I had started to work with 1.11.9.

I then created a new folder in my localhost directory so sthat Icould do a fresh install of CMSMS 1.11.8 . I went to phpMyAdmun and created a new db. and performed afresh install. I then went back to phpMYAdmin to import the sql dump and now get the following error message. I do not know how to fix this. I would appreciate any suggestions. Thanks! :)


Error

SQL query:

-- -- Dumping data for table `cms_content` -- INSERT INTO `cms_content` (`content_id`, `content_name`, `type`, `owner_id`, `parent_id`, `template_id`, `item_order`, `hierarchy`, `default_content`, `menu_text`, `content_alias`, `show_in_menu`, `collapsed`, `markup`, `active`, `cachable`, `id_hierarchy`, `hierarchy_path`, `prop_names`, `metadata`, `titleattribute`, `tabindex`, `accesskey`, `last_modified_by`, `create_date`, `modified_date`, `secure`, `page_url`) VALUES (15, 'Home', 'content', 1, -1, 24, 1, '00001', 1, 'Dr. Kyre', 'home', 1, 1, 'html', 1, 1, '15', 'home', 'target,pagedata,extra1,extra2,extra3,image,thumbnail,searchable,disable_wysiwyg,image1,content_en,filepicker_block_1,url_1,filepicker_block_2,url_2', '', 'Home Page, shortcut key=1', '', '1', 1, '2006-07-25 21:22:31', '2014-01-25 18:10:38', 0, ''), (40, 'Menu Manager', 'content', 1, 20, 24, 2, '00004.00001.00002', 0, 'Menu Manager', 'menu-manager-2', 1, NULL, 'html', 1, 1, '24.20.40', 'default-extensions/modu[...]

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

Re: error message when importing sql

Post by astuke »

Can you import to an empty database? You can setup the config.php to that datebase and then run upgrade.php
newvision
Forum Members
Forum Members
Posts: 77
Joined: Wed Jun 10, 2009 11:57 am

Re: error message when importing sql

Post by newvision »

I'll give that a try. Thanks :)
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: error message when importing sql

Post by velden »

If you do a new install you will get at least one content page installed. I wouldn't be surprised if it has ID '15' in your database.

During EXPORT of database you have option to include drop table and create table commands iirc. Then, during IMPORT, all tables that are needed and already exist are dropped (deleted) and created again.
newvision
Forum Members
Forum Members
Posts: 77
Joined: Wed Jun 10, 2009 11:57 am

Re: error message when importing sql

Post by newvision »

How so I do empty the database then do an upgrade?

How can I make sure that the db that I originally exported enables me to drop and create tables?

Is there a way that I can look at theat file and change that option if need be? I thought I always seleced that option.

So what do I do with the '15'?

Thanks :)
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: error message when importing sql

Post by velden »

I can't advise on this issue as I don't know the export file you have. Plus I think this is an advanced subject. You should know what you're doing else don't do it.
newvision
Forum Members
Forum Members
Posts: 77
Joined: Wed Jun 10, 2009 11:57 am

Re: error message when importing sql

Post by newvision »

So, YOU can't advise me on this issue. Can you tell me where I can find this out? I can't just drop the ball, here! I have full blown website that is not functioning now becasue the host installed it to a wrong location that messed up everything.

I appreciate your help. I am looking for suggestions on how I CAN resolve this. Politely telling me you think that I am in over my head is not helpful.

Can you please offer suggestions on how I CAN resole this.

Thanks!
:)
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: error message when importing sql

Post by velden »

OK:

Empty all tables from CMSMS typically prefixed with 'cms_'
Then import again.

OR

Drop all tables from CMSMS typically prefixed with 'cms_'
Then import again.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: error message when importing sql

Post by Dr.CSS »

When I import a DB most times it's into an empty DB, if I have to import into an existing DB, using phpmyadmin I click the DB name on the left, it shows all the tables on the right, at the bottom I 'select all' then in the select next to it I choose drop which well remove all existing data/tables, then import new DB...
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: error message when importing sql

Post by velden »

Dr.CSS wrote:When I import a DB most times it's into an empty DB, if I have to import into an existing DB, using phpmyadmin I click the DB name on the left, it shows all the tables on the right, at the bottom I 'select all' then in the select next to it I choose drop which well remove all existing data/tables, then import new DB...
And then it appears to be a shared database... Thats why I mention the table prefix.
Post Reply

Return to “The Lounge”