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

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

by Sam Wynens -
Number of replies: 2
Fresh install of 1.7 on:

Windows 2003 SBS R2
MySQL 5
PHP 5
IIS 6 (PHP ISAPI)

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
 
 
 

 
Average of ratings: -
In reply to Sam Wynens

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

by Timothy Takemoto -

Dear Sam
I think this is because you are using MySQL 5 running in strict mode. You need to turn off STRICT_TRANS_TABLES

From the installation documention
Moodle doesn't work with MySQL 5.x's new "STRICT_TRANS_TABLES" setting. So if you are using MySQL 5.x, edit MySQL's configuration file (called "my.ini" in Windows and "my.cnf" on Unix/Linux) and comment out that option (or simply delete it). You have to restart MySQL after changing this setting.

Timothy

In reply to Timothy Takemoto

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

by ahmet simsek -

Hi being a newbe I read carefully the above comments and edited /etc/my.cnf   with sql_mode=''  . I get still the same answer such as

mysql): SHOW TABLES  



(mysql): SHOW VARIABLES LIKE 'character_set_database'  



(mysql): SET NAMES 'utf8'  



(mysql): SHOW VARIABLES LIKE 'character_set_database'  



(mysql): SELECT name FROM mdl_mysqlconfig WHERE name = 'unicodedb' LIMIT 1  


1146: Table 'moodle.mdl_mysqlconfig' doesn't exist

                                    

(mysql): SELECT * FROM mdl_mysqlconfig WHERE id = '-1'  


1146: Table 'moodle.mdl_mysqlconfig' doesn't exist

           


Error: Main databases NOT set up successfully

I'm stuck, please help.  Thank you...

Ahmet