Moodle

Error: Main databases NOT set up successfully

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 1.7
  • Fix Version/s: 1.7.1
  • Labels:
    None
  • Environment:
    Windows XP Pro SP2 IIS MYSQL 5.*
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_17_STABLE
  • Fixed Branches:
    MOODLE_17_STABLE

Description

I have a DB and a user with full access to it, but when I get to the point of having moodle setup the tables I get :
(mysql): ALTER TABLE mdl_log_display COMMENT='For a particular module/action, specifies a moodle table/field'
--------------------------------------------------------------------------------
1105: Too long comment for table '#sql-314_1e'

ADOConnection._Execute(ALTER TABLE mdl_log_display COMMENT='For a particular module/action, specifies a moodle table/field', false) % line 889, file: adodb.inc.php
ADOConnection.Execute(ALTER TABLE mdl_log_display COMMENT='For a particular module/action, specifies a moodle table/field') % line 71, file: dmllib.php
execute_sql(ALTER TABLE mdl_log_display COMMENT='For a particular module/action, specifies a moodle table/field', true) % line 1737, file: dmllib.php
execute_sql_arr(Array[235]) % line 548, file: ddllib.php
install_from_xmldb_file(C:\Inetpub\wwwroot\moodle/lib/db/install.xml) % line 147, file: index.php
ErrorScroll to next warning

I get 7 other messages that have errors and I then get at the bottem of the screen Error: Main databases NOT set up successfully. I have tried to just hit continue, but it quickly goes to another screen with setting up more tables, cept this time I get 21 errors. Please help

Issue Links

Activity

Hide
Olalekan H ABOU BAKAR added a comment -

i have the same issue while i'm installing moodle on my computer.........

Show
Olalekan H ABOU BAKAR added a comment - i have the same issue while i'm installing moodle on my computer.........
Hide
Ken Wilson added a comment -

For reference, mysql 5 has a maximum of 60 characters for table comments.

Show
Ken Wilson added a comment - For reference, mysql 5 has a maximum of 60 characters for table comments.
Hide
Lisa Howard added a comment -

Can this issue be fixed? I'm stuck too. Thanks, Lisa

Show
Lisa Howard added a comment - Can this issue be fixed? I'm stuck too. Thanks, Lisa
Hide
Ken Wilson added a comment -

There must be a setting in mysql which is causing it to squawk - but I just can't find it. I've done an install on mysql 5.0.24 and seen it truncate comment fields over 60 characters and not complain - checked in 1.6.3 and these are the same comments.

So this diff against 1.7-stable is attached to shorten the comments to below 60 characters. If this fixes the problem, it may be worthwhile looking for others (the RSS block comments for instance) and changing those as well.

Show
Ken Wilson added a comment - There must be a setting in mysql which is causing it to squawk - but I just can't find it. I've done an install on mysql 5.0.24 and seen it truncate comment fields over 60 characters and not complain - checked in 1.6.3 and these are the same comments. So this diff against 1.7-stable is attached to shorten the comments to below 60 characters. If this fixes the problem, it may be worthwhile looking for others (the RSS block comments for instance) and changing those as well.
Hide
Ken Wilson added a comment -

I think I may have something... See http://bugs.mysql.com/bug.php?id=13934. It seems that a mysql server >= 5.0.24 running in strict mode will issue an error when table comments are greater than 60 chars. The behaviour before (strict mode or not) was to silently truncate - which explains why the comments in 1.6.3 worked fine.

Show
Ken Wilson added a comment - I think I may have something... See http://bugs.mysql.com/bug.php?id=13934. It seems that a mysql server >= 5.0.24 running in strict mode will issue an error when table comments are greater than 60 chars. The behaviour before (strict mode or not) was to silently truncate - which explains why the comments in 1.6.3 worked fine.
Hide
Eloy Lafuente (stronk7) added a comment -

Yes!

Closing this as duplicate of MDL-7765. Thanks for the report! Ciao

Show
Eloy Lafuente (stronk7) added a comment - Yes! Closing this as duplicate of MDL-7765. Thanks for the report! Ciao
Hide
Ken Wilson added a comment -

Thanks Eloy. A slight correction for information: the current installation will fail with mysql server >=5.0.25 in strict mode. The mysql fix was for 5.0.24 but not applied until 5.0.25 release. Much of the forum traffic on this issue is from users with 5.0.25 or higher, so this confirms the problem.

Show
Ken Wilson added a comment - Thanks Eloy. A slight correction for information: the current installation will fail with mysql server >=5.0.25 in strict mode. The mysql fix was for 5.0.24 but not applied until 5.0.25 release. Much of the forum traffic on this issue is from users with 5.0.25 or higher, so this confirms the problem.

Dates

  • Created:
    Updated:
    Resolved: