by Matias Eduardo Bordone Carranza.
Hi everybody. I'll describe my problem
I have to migrate a moodle 2.3 instalation. I made the backup with phpmyadmin
in the new server when i try to restore the backup in a new and clean databse i have the following error
ERROR: C1 C2 LEN: 17 18 765 STR:MySQL: 5.6.26-log USR OS, AGENT, VER: Linux CHROME 5.0.58PMA: 4.0.10.15 PHP VER,OS: 5.2.17 Linux LANG: esSQL: mebordon_mdl2.sql000644 001750 001750 02613375130 13107577031 015151 0ustar00matiasmatias000000 000000 -- phpMyAdmin SQL Dump -- version 4.3.8 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 19-05-2017 a las 08:08:46 -- Versión del servidor: 5.6.32-78.1-log -- Versión de PHP: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";----FIN DEL VOLCADO----
consulta SQL:
mebordon_mdl2.sql000644 001750 001750 02613375130 13107577031 015151 0ustar00matiasmatias000000 000000 -- phpMyAdmin SQL Dump -- version 4.3.8 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 19-05-2017 a las 08:08:46 -- Versión del servidor: 5.6.32-78.1-log -- Versión de PHP: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
#1064 - 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 'mebordon_mdl2.sql' at line 1
So i tried to restore this file on a local database with the following result
#################################
Importing mebordon_mdl2.sql...
Finished executing script
ERROR 1062 (23000) at line 1152590: Duplicate entry '1' for key 'PRIMARY'
Operation failed with exitcode 1
##################################
When i see the line 1152590 of the file i have this result
##################################
--
-- Indices de la tabla `mdl_assign`
--
ALTER TABLE `mdl_assign`
ADD PRIMARY KEY (`id`), ADD KEY `mdl_assi_cou_ix` (`course`);
####################################
I looked for a duplicate entry on this table, but i didn't discover none duplicate entrance with the value 1
This is the insert sentence, but i don think this to be a problem
##############################
INSERT INTO `mdl_assign` (`id`, `course`, `name`, `intro`, `introformat`, `alwaysshowdescription`, `nosubmissions`, `preventlatesubmissions`, `submissiondrafts`, `sendnotifications`, `sendlatenotifications`, `duedate`, `allowsubmissionsfromdate`, `grade`, `timemodified`) VALUES
(1, 2, 'Actividad de Aprendizaje nro. 1. Obligatoria', ....., ) -- i ommited the hole sentence.
################################
Can you give me a clue?
Thanks so much