Im using Moodle 3.6.3+ (Build: 20190322) and trying to restore a course from a 3.6 version. I have transfered 20 courses with no problem, but i have 5 with this "error writing to database".
Searching on the forum i discovered that is a old bug already fixed. And i already tried increase max_allowed_packet like the oficial documentation says: https://docs.moodle.org/310/en/error/moodle/dmlwriteexception
Can you guys give me a help?
Sorry about my english, Isnt my first language.
Duplicate entry '0-0007725566-1' for key 'mdlq1_user_mneuse_uix'
INSERT INTO mdlq1_user (username,idnumber,email,icq,skype,yahoo,aim,msn,phone1,phone2,institution,department,address,city,country,lastip,picture,url,description,descriptionformat,imagealt,auth,firstnamephonetic,lastnamephonetic,middlename,alternatename,firstname,lastname,confirmed,policyagreed,deleted,lang,theme,timezone,firstaccess,lastaccess,lastlogin,currentlogin,mailformat,maildigest,maildisplay,autosubscribe,trackforums,timecreated,timemodified,trustbitmask,password) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[array (
0 => '0007725566-1',
1 => '',
2 => 'cintiaamelo@ig.com.br',
3 => '',
4 => '',
5 => '',
6 => '',
7 => '',
8 => '',
9 => '',
10 => '',
11 => '',
12 => '',
13 => '',
14 => '',
15 => '187.38.63.103',
16 => '0',
17 => '',
18 => '<p></p><br />',
19 => '1',
20 => '',
21 => 'manual',
22 => '',
23 => '',
24 => '',
25 => '',
26 => 'CINTIA APARECIDA ROMEIRO DE',
27 => 'MELO',
28 => '1',
29 => 0,
30 => '0',
31 => 'pt_br',
32 => '',
33 => '99',
34 => '1492469889',
35 => '1628209488',
36 => '1627221181',
37 => '1628209488',
38 => '1',
39 => '0',
40 => '2',
41 => '1',
42 => '0',
43 => '1488022500',
44 => '1622634057',
45 => '0',
46 => 'restored',
)]
Error code: dmlwriteexception
Rastreamento de pilha:
line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 1357 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1403 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
line 1245 of /backup/util/dbops/restore_dbops.class.php: call to mysqli_native_moodle_database->insert_record()
line 1147 of /backup/moodle2/restore_stepslib.php: call to restore_dbops::create_included_users()
line 34 of /backup/util/plan/restore_execution_step.class.php: call to restore_create_included_users->define_execution()
line 181 of /backup/util/plan/base_task.class.php: call to restore_execution_step->execute()
line 178 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
line 168 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
line 385 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
line 219 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
line 143 of /backup/restore.php: call to restore_ui->execute()