Unknown driver native/mysql"

Unknown driver native/mysql"

by chris thorne -
Number of replies: 12

 

When running the install.php I get:

"Error: database driver problem detected
The site administrator should verify server configuration
Unknown driver native/mysql"

what can cause this message?

Average of ratings: -
In reply to chris thorne

Re: Unknown driver native/mysql"

by chris thorne -

One answer: do *not* create a config.php before running the install script!

The config.php is generated by install.php. Once I removed the one I created the page loaded - doh!

In reply to chris thorne

Re: Unknown driver native/mysql"

by Dominick Inglese -

hey chris thorne this worked for me! thanks for the tip! 

the installation instructions suggest to rename and edit the config.php and that's what I did. 

But your suggestion helped a lot! 

In reply to chris thorne

Re: Unknown driver native/mysql"

by Stuart Buck -

If your installing Moodle 2.0 then try mysqli.

In reply to Stuart Buck

Re: Unknown driver native/mysql"

by Aaron Batty -

So is the mysql driver just gone in 2.0?

I have a MySQL database set up, but I don't see a MySQL driver listed in the dropdown on the install script.

Searching the forums on this issue is really confusing. We really ought to have different forums for the versions...

In reply to Aaron Batty

Re: Unknown driver native/mysql"

by Stuart Mealor -

Last time I saw this message it was because the wrong database type was included in the config.php file.  This is why the previous advice of letting Moodle create the config.php file itselfe would work smile

However, see below and use of the type:

//=========================================================================
// 1. DATABASE SETUP
//=========================================================================
// First, you need to configure the database where all Moodle data       //
// will be stored.  This database must already have been created         //
// and a username/password created to access it.                         //

$CFG->dbtype    = 'mysqli';      // 'pgsql', 'mysqli', 'mssql' or 'oci'
$CFG->dblibrary = 'native';     // 'native' only at the moment

In reply to Stuart Mealor

Re: Unknown driver native/mysql"

by seaghan moriarty -

 

Letting Moodle create the config.php precludes choosing MySQL, because MySQL does not seem to be supported. Manually entering mysql as database type leads to the error above - but my question now is ...

Does Moodle  no longer support MySQL as a database type? I know MySQL lite / improved etc. is similar - but surprised that plain vanilla MySQL does not seem available.

Anyone got additional info on this please? TIA

In reply to seaghan moriarty

Re: Unknown driver native/mysql"

by seaghan moriarty -

 

Phrased another way - it seems to me that Moodle 2.0 no longer supports MySQL.

I'm sure I *must* be wrong, but this line suggests that 'pgsql', 'mysqli', 'mssql' or 'oci' are the only database drivers supported ...

$CFG->dbtype    = '';      // 'pgsql', 'mysqli', 'mssql' or 'oci'

(manually editing config.cfg does not connect either)

In reply to seaghan moriarty

Re: Unknown driver native/mysql"

by Peter Loesche -

MySQLi is an improved version of the older PHP MySQL driver (interface with MySQL databases).  For further explanations please look here http://moodle.org/mod/forum/discuss.php?d=168041&parent=737325

In reply to Peter Loesche

Re: Unknown driver native/mysql"

by seaghan moriarty -

Thank you Peter.

Now I understand that MySQL is indeed supported, but Moodle will only work with a good deal of work involving multiple php.ini files in various folders and sub-folders.

Much more complex, but at least now I know it is possible ...
Thanks!

In reply to seaghan moriarty

Re: Unknown driver native/mysql"

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The MySQLi extension is very standard. Where are you getting your PHP from that it does not this library available and enabled by default?

In reply to Tim Hunt

Re: Unknown driver native/mysql"

by seaghan moriarty -

Thank you Peter, Tim - Now I understand.

To explain and apologise ...
An unrelated database connection was (unknown to me) my real problem. I was so sure of all my setup - and the only explanation that *I* could see was my perceived lack of a 'regular' MySQL database driver. Mea maxima culpa!

In reply to seaghan moriarty

Re: Unknown driver native/mysql"

by Peter Kupfer -

Seaghan --

Can you unexplain this unrelated connection? I am having the same problem, and am amazed that this is happening and no one has an answer other than making 50 php.ini files, which didn't work for me anyway.

Thanks,

Peter