Serious Error: Could Not Create Admin user Record

Serious Error: Could Not Create Admin user Record

by John Withers -
Number of replies: 9

Hi,

I am having problems setting up and configuring Moodle 1.8+ on IIS/MySQL.

Running through the installation I encountered the following errors (shown below) and now get a message "SERIOUS ERROR: Could not create admin user record !!!" when I reach the end of the installation. This happens when I reach the url: http://vle.schoolwebsite.sch.uk/admin/index.php

I have access to phpmyadmin should I need to change the configuration of anything.

Any ideas?


(mysql): CREATE TABLE mdl_sessions2 ( sesskey VARCHAR(64) NOT NULL DEFAULT '', expiry DATETIME NOT NULL, expireref VARCHAR(250) DEFAULT '', created DATETIME NOT NULL, modified DATETIME NOT NULL, sessdata LONGTEXT DEFAULT '', CONSTRAINT PRIMARY KEY (sesskey) )

1101: BLOB/TEXT column 'sessdata' can't have a default value

ADOConnection._Execute(CREATE TABLE mdl_sessions2 (

sesskey VARCHAR(64) NOT NULL DEFAULT '',

expiry DATETIME NOT NULL,

expireref VARCHAR(25..., false) % line 889, file: adodb.inc.php

ADOConnection.Execute(CREATE TABLE mdl_sessions2 (

sesskey VARCHAR(64) NOT NULL DEFAULT '',

expiry DATETIME NOT NULL,

expireref VARCHAR(25...) % line 89, file: dmllib.php

execute_sql(CREATE TABLE mdl_sessions2 (

sesskey VARCHAR(64) NOT NULL DEFAULT '',

expiry DATETIME NOT NULL,

expireref VARCHAR(25..., true) % line 1899, file: dmllib.php

execute_sql_arr(Array[262]) % line 548, file: ddllib.php

install_from_xmldb_file(D:\inetpub\vle/lib/db/install.xml) % line 179, file: index.php

Error Scroll to next warning

(mysql): ALTER TABLE mdl_sessions2 COMMENT='Optional database session storage in new format, not used by'

1146: Table 'vle.mdl_sessions2' doesn't exist

ADOConnection._Execute(ALTER TABLE mdl_sessions2 COMMENT='Optional database session storage in new format, not used by', false) % line 889, file: adodb.inc.php

ADOConnection.Execute(ALTER TABLE mdl_sessions2 COMMENT='Optional database session storage in new format, not used by') % line 89, file: dmllib.php

execute_sql(ALTER TABLE mdl_sessions2 COMMENT='Optional database session storage in new format, not used by', true) % line 1899, file: dmllib.php

execute_sql_arr(Array[262]) % line 548, file: ddllib.php

install_from_xmldb_file(D:\inetpub\vle/lib/db/install.xml) % line 179, file: index.php

Scroll to previous warning Error Scroll to next warning

(mysql): CREATE INDEX mdl_sess_exp_ix ON mdl_sessions2 (expiry)

1146: Table 'vle.mdl_sessions2' doesn't exist

ADOConnection._Execute(CREATE INDEX mdl_sess_exp_ix ON mdl_sessions2 (expiry), false) % line 889, file: adodb.inc.php

ADOConnection.Execute(CREATE INDEX mdl_sess_exp_ix ON mdl_sessions2 (expiry)) % line 89, file: dmllib.php

execute_sql(CREATE INDEX mdl_sess_exp_ix ON mdl_sessions2 (expiry), true) % line 1899, file: dmllib.php

execute_sql_arr(Array[262]) % line 548, file: ddllib.php

install_from_xmldb_file(D:\inetpub\vle/lib/db/install.xml) % line 179, file: index.php

Scroll to previous warning Error Scroll to next warning

(mysql): CREATE INDEX mdl_sess_exp2_ix ON mdl_sessions2 (expireref)

1146: Table 'vle.mdl_sessions2' doesn't exist

ADOConnection._Execute(CREATE INDEX mdl_sess_exp2_ix ON mdl_sessions2 (expireref), false) % line 889, file: adodb.inc.php

ADOConnection.Execute(CREATE INDEX mdl_sess_exp2_ix ON mdl_sessions2 (expireref)) % line 89, file: dmllib.php

execute_sql(CREATE INDEX mdl_sess_exp2_ix ON mdl_sessions2 (expireref), true) % line 1899, file: dmllib.php

execute_sql_arr(Array[262]) % line 548, file: ddllib.php

install_from_xmldb_file(D:\inetpub\vle/lib/db/install.xml) % line 179, file: index.php

Scroll to previous warning Error Scroll to continue button

Average of ratings: -
In reply to John Withers

Re: Serious Error: Could Not Create Admin user Record

by yusof yaghi -
Hi
same with me !!!!!
Anybody knows the solution to this one sad
Thank you
Yusof Yaghi
In reply to John Withers

回复: Serious Error: Could Not Create Admin user Record

by 磊 孙 -
chang mysql modes -disable strict mode


In reply to 磊 孙

Re: 回复: Serious Error: Could Not Create Admin user Record

by mat young -
what file is the "disable strict mode" in?


thanks all! big grin
In reply to mat young

Re: 回复: Serious Error: Could Not Create Admin user Record

by Ken Wilson -

MySQL strict mode is disabled in your my.ini (windows users) or the my.cnf (others) file. In my.cnf, add a line as follows:

sql-mode = ""

See the installation docs for how to do this if you don't have access to the .cnf file. Note also that there is a request (MDL-9722) in the tracker for Moodle to check if mysql strict mode is enabled on installation.

In reply to Ken Wilson

Re: 回复: Serious Error: Could Not Create Admin user Record

by Michael J. Ryan -

I'm trying to install 1.8+ on an apache 2.2 server running on a Windows XP box.  During installation of MySQL I configured it for strict mode to be disabled.  I get the same group of errors that John describes in his original post.  I just checked my.ini (or Linus "my.cnf") and, although I unchecked the strict mode checkbox in the MySQL setup wizard, it is still set for strict mode.  I'm going to set it to a null string and see if that changes anything.  I let you know.

Thanks

Mike Ryan

In reply to Ken Wilson

Re: 回复: Serious Error: Could Not Create Admin user Record

by Matt Molloy -

Hi all,

Trying to install Moodle on a Mac Tiger 10.4.

I downloaded xampp for mac, got that running, then dropped the latest Moodle into the htdocs folder. Did all the usual, ran the installation script, and everything goes as normal until it creates the database. All the usual tables are created, but at the last hurdle, instead of getting to the stage of logging in as admin, the system returns error messages which are mostly of the kind:

SERIOUS ERROR: Could not create admin user record !!! (this one led me to this discussion)

or: User ID was incorrect (can't find it)

or can't create the admin user.

I've done as Ken suggested by adding sql-mode = "", but to no avail. Any more suggestions?

Matt

In reply to 磊 孙

Re: 回复: Serious Error: Could Not Create Admin user Record

by C Barrain -
How do you disable strict mode it in your internet host?

Then how do you run the reinstall?

Do you delete the mysql database and create a new one?

Please advice