My hosting company wants me to move from a MySQL 4 server to a MySQL 5.5 one. My database is relatively big as my website hosts the data of nearly 200,000+ registered users.
I made an export of all my tables using PHPMyAdmin and I am now trying to import them into the new server. Everything went fine until I tried to import the 'user' table. For information, here is its structure:
CREATE TABLE IF NOT EXISTS `user` (
`login` varchar(32) NOT NULL DEFAULT '',
`firstname` varchar(255) NOT NULL DEFAULT '',
`lastname` varchar(255) NOT NULL DEFAULT '',
`email` varchar(255) NOT NULL DEFAULT '',
...
PRIMARY KEY (`login`),
KEY `country_code` (`country_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Nothing spectacular, right? Using the PHPMyAdmin import tab, I uploaded the SQL file. Suddenly, I got the following error:
#1062 - Duplicate entry 'Jobi' for key 'PRIMARY'
I immediately queried the database and search for a username whom login was 'Jobi'. No match!
I had a look at the query which generated the error and tried to do it manually...
INSERT INTO `ft_user`
(`login`, `firstname`, `lastname`, `email`, ...)
VALUES
('Jobi', 'Lorem-First', 'Ipsum-Last', 'xxxxx@yyyy.com', ...);
and it worked just fine!
I made the test on my development machine and got the same error. Could someone explain me what I am doing wrong here?
Thank you in advance. Any help is really appreciated.
Hervé.