bramvanderschaaf
Gebruiker
- Lid geworden
- 5 mrt 2016
- Berichten
- 5
Heren en dames,
Ik heb een vreemd probleem (althans vind ik). Ik heb een aantal opencart shops draaien op mijn VPS.
Ik heb een tabel oc_product_description (zie bijlage). Als ik die exporteer als sql en vervolgens importeer (zelfs zonder iets te wijzigen) dan krijg ik de volgende foutmelding:
#1062 - Duplicate entry '170-1' for key 'PRIMARY'
Is er iemand die mij kan uitleggen hoe dit op te lossen??????? kan het aan de server liggen???
Mijn dank is bij voorbaat zeer groot. gr bram
Bekijk bijlage oc_product_description.zip
Van iemand die wel eens iets gedaan heeft kreeg ik de volgende antwoorden, zonder succes:
This is your mysql server issue ( columns 'product_id' and 'language_id' are 'primary key') Can you send message to your host?
This copy:
[sql]
CREATE TABLE IF NOT EXISTS `oc_product_description` (
`product_id` int(11) NOT NULL,
`language_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`description` text NOT NULL,
`tag` text NOT NULL,
`meta_title` varchar(255) NOT NULL,
`meta_description` varchar(255) NOT NULL,
`meta_keyword` varchar(255) NOT NULL,
PRIMARY KEY (`product_id`,`language_id`),
KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
[/sql]
I did already in spring try fix this from opencart sql to compatibility with your mysql server
EN:
You can try to phpmyadmin, in table product_description.
You click 'structure' and checked column product_id. Then click 'Primary' and try remove (Drop) primary.
EN:
in spring opencart default database structure was is not worked in your server.
This your current datavase structure:
[sql]
CREATE TABLE IF NOT EXISTS `oc_product_description` (
`product_id` int(11) NOT NULL,
`language_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`description` text NOT NULL,
`meta_title` varchar(255) NOT NULL,
`meta_description` varchar(255) NOT NULL,
`meta_keyword` varchar(255) NOT NULL,
`tag` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Can you do this edit to file product_description.sql:
CREATE TABLE IF NOT EXISTS `oc_product_description` (
`product_id` int(11) NOT NULL,
`language_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`description` text NOT NULL,
`meta_title` varchar(255) NOT NULL,
`meta_description` varchar(255) NOT NULL,
`meta_keyword` varchar(255) NOT NULL,
`tag` text NOT NULL,
PRIMARY KEY (`product_id`,`language_id`),
KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
[/sql]
Then, before upgrade you try rename table oc_product_description to oc_product_description2
EN:
Hi
If your sql script is Ok, it is your mysl server error.
You can try do clean install to folder public-html/test to different database.
Sure you need send message to host.
Pekka
28.3.2016, 14:16, bram van der schaaf kirjoitti:
thx, did that. but if i now import the sql from description2 it gives the following error.
SQL-query:
[sql]
--
-- Indexen voor geëxporteerde tabellen
--
--
-- Indexen voor tabel `oc_product_description`
--
ALTER TABLE `oc_product_description`
ADD PRIMARY KEY (`product_id`,`language_id`),
ADD KEY `name` (`name`);
[/sql]
MySQL meldt: Documentatie
#1068 - Multiple primary key defined
Ik heb een vreemd probleem (althans vind ik). Ik heb een aantal opencart shops draaien op mijn VPS.
Ik heb een tabel oc_product_description (zie bijlage). Als ik die exporteer als sql en vervolgens importeer (zelfs zonder iets te wijzigen) dan krijg ik de volgende foutmelding:
#1062 - Duplicate entry '170-1' for key 'PRIMARY'
Is er iemand die mij kan uitleggen hoe dit op te lossen??????? kan het aan de server liggen???
Mijn dank is bij voorbaat zeer groot. gr bram
Bekijk bijlage oc_product_description.zip
Van iemand die wel eens iets gedaan heeft kreeg ik de volgende antwoorden, zonder succes:
This is your mysql server issue ( columns 'product_id' and 'language_id' are 'primary key') Can you send message to your host?
This copy:
[sql]
CREATE TABLE IF NOT EXISTS `oc_product_description` (
`product_id` int(11) NOT NULL,
`language_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`description` text NOT NULL,
`tag` text NOT NULL,
`meta_title` varchar(255) NOT NULL,
`meta_description` varchar(255) NOT NULL,
`meta_keyword` varchar(255) NOT NULL,
PRIMARY KEY (`product_id`,`language_id`),
KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
[/sql]
I did already in spring try fix this from opencart sql to compatibility with your mysql server
EN:
You can try to phpmyadmin, in table product_description.
You click 'structure' and checked column product_id. Then click 'Primary' and try remove (Drop) primary.
EN:
in spring opencart default database structure was is not worked in your server.
This your current datavase structure:
[sql]
CREATE TABLE IF NOT EXISTS `oc_product_description` (
`product_id` int(11) NOT NULL,
`language_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`description` text NOT NULL,
`meta_title` varchar(255) NOT NULL,
`meta_description` varchar(255) NOT NULL,
`meta_keyword` varchar(255) NOT NULL,
`tag` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Can you do this edit to file product_description.sql:
CREATE TABLE IF NOT EXISTS `oc_product_description` (
`product_id` int(11) NOT NULL,
`language_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`description` text NOT NULL,
`meta_title` varchar(255) NOT NULL,
`meta_description` varchar(255) NOT NULL,
`meta_keyword` varchar(255) NOT NULL,
`tag` text NOT NULL,
PRIMARY KEY (`product_id`,`language_id`),
KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
[/sql]
Then, before upgrade you try rename table oc_product_description to oc_product_description2
EN:
Hi
If your sql script is Ok, it is your mysl server error.
You can try do clean install to folder public-html/test to different database.
Sure you need send message to host.
Pekka
28.3.2016, 14:16, bram van der schaaf kirjoitti:
thx, did that. but if i now import the sql from description2 it gives the following error.
SQL-query:
[sql]
--
-- Indexen voor geëxporteerde tabellen
--
--
-- Indexen voor tabel `oc_product_description`
--
ALTER TABLE `oc_product_description`
ADD PRIMARY KEY (`product_id`,`language_id`),
ADD KEY `name` (`name`);
[/sql]
MySQL meldt: Documentatie
#1068 - Multiple primary key defined
Laatst bewerkt door een moderator: