Moodle eeror写入数据库

时间:2019-05-24 09:14:12

标签: kubernetes moodle moodle-api moodle-mobile

我在具有状态集的数据库上运行kubernetes。

Moodle version : $version  = 2018120303.14;              // 20181203      = branching date YYYYMMDD - do not modify!
                                        //         RR    = release increments - 00 in DEV branches.
                                        //           .XX = incremental changes.

$release  = '3.6.3+ (Build: 20190501)'; // Human-friendly version name

$branch   = '36';                       // This version's branch.
$maturity = MATURITY_STABLE;             // This version's maturity level.

写入数据库时​​出错 有关此错误的其他信息

Debug info: Duplicate entry '1-12345678900' for key 'mdl_user_mneuse_uix'
INSERT INTO mdl_user (city,auth,policyagreed,idnumber,username,password,firstname,lastname,email,lang,confirmed,lastip,timecreated,timemodified,mnethostid) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[array (
0 => '',
1 => 'wp2moodle',
2 => 1,
3 => '1584',
4 => '12345678900',
5 => 'a803bc70a48ce4568a9e85f7e1e30c58',
6 => 'Pedro',
7 => 'Marinelli',
8 => 'pedromarinelli@email.com',
9 => 'pt_br',
10 => 1,
11 => '177.192.193.143',
12 => 1537303059,
13 => 1537303059,
14 => '1',
)]

错误代码:dmlwriteexception

  

堆栈跟踪:/lib/dml/moodle_database.php的第489行:   dml_write_exception抛出第1329行   /lib/dml/mysqli_native_moodle_database.php:调用   moodle_database-> query_end()第1375行,   /lib/dml/mysqli_native_moodle_database.php:调用   mysqli_native_moodle_database-> insert_record_raw()第232行   /auth/wp2moodle/login.php:调用   mysqli_native_moodle_database-> insert_record()

2 个答案:

答案 0 :(得分:0)

您正在尝试将重复的用户名添加到数据库中。请检查,您输入的用户名已经存在。

答案 1 :(得分:0)

运行此命令,此命令需要进行安装(3.1和新版本)

php admin / cli / mysql_collat​​ion.php --collat​​ion = utf8mb4_unicode_ci