Error: Main databases NOT set up successfully

Error: Main databases NOT set up successfully

by Harald H -
Number of replies: 4

Hi everyone,

in the first step of the moodle setup i everything is fine, in the next step i got a messege...."Error: Main databases NOT set up successfully" that is because moodlöe reports that there are several tables already existing like:

"1050: Table 'mdl_config' already exists" and so on,

if i click on continue, there is always the same screen,

instalation is not finishing,

any idea?

TIA

Harald

Average of ratings: -
In reply to Harald H

Re: Error: Main databases NOT set up successfully

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
well does it already exist?

It sounds as though your installation is clashing with another moodle install on the same mysql server. Is this possible? You can have multiple installations, but you either have to use a completely different database (and database user to be on the safe side), or change the prefix from mdl_ to something else (done in config.php).
In reply to Howard Miller

Re: Error: Main databases NOT set up successfully

by Harald H -

thanks for the answer, but it is the only moodle installation on the server, and there the db is only for the moodle installation.

i think the problem is maybe a missconfiguration of php. i can start the installation, it setup the first set of tabelles, when i click on continue it just call the same index.php side again (not the next step), of course i get a message tables existing already.

so i guess moodle is not able to send variables to the next installation page.

actually i dont know what is the problem. there are running several complex php scripts on this server (like typo3 or phprojekt).

any idea?

thanks

In reply to Harald H

Re: Error: Main databases NOT set up successfully

by Todd Benson -
I figured out your problem.  I had the same problem.  It is an error in the mysql.sql file.  For the table 'prefix_user_teachers', it tries to create a index by using the following syntax 'KEY UNIQUE `courseuserid` (course,userid)'.  This is incorrect and causes MySQL to error out.  Just change the line to say 'UNIQUE KEY `courseuserid` (course,userid)'.  And then it works.