Databases: MySQL not supported by XMLDB

Databases: MySQL not supported by XMLDB

by Suzanne Jensen -
Number of replies: 11

I did a completely fresh upload of 1.9 (previous version was 1.5). When launching the install process after uploading the files, however, the webpage opened in Firefox with this message in a pink box:

"DB type: MYSQL not supported by XMLDDB"

Reverting to the 1.5 version of Moodle, everything functioned normally. However, I really would like to upgrade as I know there are security issues in older versions of Moodle.

My OS is WinXP, I am using a web host, and the web interface is cPanel. The webhosting help personnel suggested the following: 

"This issue seems to be with the non-compatibility of scripts with the existing tables on moodle database.You can refer to http://docs.moodle.org/en/XMLDB_preliminary_notes or support of moodle for the fix."

However I found nothing that referred specifically to this problem/error message, and all-in-all the language used to explain XMLDB/MYSQL compatibility was way beyond me.

 Can anyone help?

Average of ratings: -
In reply to Suzanne Jensen

Re: Databases: MySQL not supported by XMLDB

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It definitely does not mean that. MySQL works fine. That is what this web site is running on!

Is it something as simple as that it needs to be 'mysql', not 'MYSQL' in the config file?
In reply to Tim Hunt

Re: Databases: MySQL not supported by XMLDB

by Suzanne Jensen -
Thanks for your reply.  In fact, the spec in the config file is 'mysql', not 'MSQL'.  I copied the previous config file directly to the new one, that's why (I feel) the problem is not with 'mysql' but s.t. new in 1.9 having to do with the XMLDB business.  It's been 2 years since I did an upgrade--has a new line been added to the config file in that time?
In reply to Suzanne Jensen

Re: Databases: MySQL not supported by XMLDB

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hmm that's odd. Try changing "mysql" to "mysqli" for the dbtype in config.php
In reply to Martin Dougiamas

Re: Databases: MySQL not supported by XMLDB

by Suzanne Jensen -

Hello again Martin,

Thank you so much for taking the time to answer my plea for help.  Your suggestion, I'm sorry to say, didn't achieve the desired result. The page message was the same.

One thing I noticed though: we keep talking about XMLDB, but actually the screen message says XMLDDB (double 'D').  Do you think that has any bearing on the problem?

Suzanne

In reply to Suzanne Jensen

Re: Databases: MySQL not supported by XMLDB

by Keith Wellman -
It's been a long time since this post was made but I still have this problem and get the same error.

This is preventing me from being able to install any mods/plugins.

Have you found an answer and did that double "D" have anything to do with the problem?

Keith
In reply to Keith Wellman

Re: Databases: MySQL not supported by XMLDB

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
No, the double D in the error message is just a typo in the error message. (Which I am about to fix.)

However, it is quite useful becuase it makes it easy for me to find the code generating the error message:
 if (!file_exists($CFG->libdir . '/xmldb/classes/generators/' . $CFG->dbtype . '/' . $CFG->dbtype . '.class.php')) {
 error ('DB Type: ' . $CFG->dbtype . ' not supported by XMLDB');
 }
OK, so based on the setting $CFG->dbtype, let us say that is 'mysql', it is looking for a file called

.../lib/xmldb/classes/generators/mysql/mysql.class.php

So you need to compare exactly what is in your config.php file with what is in the lib/xmldb/classes/generators folder, and see if that makes any sense.
In reply to Tim Hunt

Re: Databases: MySQL not supported by XMLDB

by Keith Wellman -
Well, the easiest way to fix this for me was to upgrade to the latest release smile

I used fantasico in cpanel to upgrade and it worked flawlessly.

By the way I used that double D to find the code as well ;)

Keith

In reply to Keith Wellman

Re: Databases: MySQL not supported by XMLDB

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well, sadly that typo is now fixed.

But perhaps we should consider introducing a different unique typo into every Moodle error message wink.
In reply to Tim Hunt

Re: Databases: MySQL not supported by XMLDB

by Deleted user -
About a year ago I decided to upgrade from 1.6 to 1.9. I did one upgrade at a time instead of jumping directly to 1.9... 1.6 to 1.7, then 1.7 to 1.8, then 1.8 to 1.9... It took a little longer, but at each upgrade I checked that everything still seemed to function as it should, then moved on to the next one. This could be a solution you could try.
In reply to Tim Hunt

Re: Databases: MySQL not supported by XMLDB

by Micky Fokken -

I'm getting the same error message after copying my production server to a test server.

On both machines, my generators folder only contains "XMLDBGenerator.class.php"

I am NOT receiving the error message on the live server, though the settings are the same in config.php.

Thoughts?

In reply to Micky Fokken

Re: Databases: MySQL not supported by XMLDB

by Micky Fokken -

Realized this was occuring on the production server too.  The Theme on the production server made the "notification" message look different, so i missed it.  Dug.

Downloaded 1.9.1 source code.  Copied mysql folder to the generators folder.  Fixed the problem.