Cannot install moodle on local host (cannot create database)

Cannot install moodle on local host (cannot create database)

by Peter Bradley -
Number of replies: 7

I'm trying to install moodle 2.1.1 on my local linux box (Linux Mint 11 == Ubuntu), but I can't get past the database setup page.  I've created a database user called 'moodle', for an empty database also called 'moodle' and given that user full permissions on that database as per the instructions on http://docs.moodle.org/20/en/Installing_Moodle.  However when I run the installation script, as soon as I press 'Next' on the database settings page I get the following message in red:

cannotcreatedb

I also get this across the top of the page:

Warning: mysqli::close(): Couldn't fetch mysqli in /var/www/moodle/lib/dml/mysqli_native_moodle_database.php on line 336 Call Stack: 0.0013 544268 1. {main}() /var/www/moodle/install.php:0 0.1022 16039464 2. moodle_database->__destruct() /var/www/moodle/lib/dml/moodle_database.php:0 0.1022 16039464 3. mysqli_native_moodle_database->dispose() /var/www/moodle/lib/dml/moodle_database.php:140 0.1022 16039716 4. mysqli->close() /var/www/moodle/lib/dml/mysqli_native_moodle_database.php:336

Mysqli is installed as follows:

Client API library version 5.1.49
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 0
Client API header version 5.1.49
MYSQLI_SOCKET /var/run/mysqld/mysqld.sock
DirectiveLocal ValueMaster Value
mysqli.allow_local_infile On On
mysqli.allow_persistent On On
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.max_persistent Unlimited Unlimited
mysqli.reconnect Off Off

My PHP version is 5.3.3-1ubuntu9.5

I'd be grateful for any help.

Thanks

PAE

Average of ratings: -
In reply to Peter Bradley

Re: Cannot install moodle on local host (cannot create database)

by Stuart Morrison -

Hi

I would start with looking at what the command "sudo service mysql status" in the shell reports.

Let us know.

 

In reply to Stuart Morrison

Re: Cannot install moodle on local host (cannot create database)

by Peter Bradley -

mysql start/running, process 1482

I knew it was, anyway.  I've also checked I can log in as the moodle user and that all the assigned permissions are shown as available (in MySQL Administrator and Query Analyser).

Cheers

PAE

In reply to Peter Bradley

Re: [solved] Cannot install moodle on local host (cannot create database)

by Peter Bradley -

This is me eating a fairly large slice of humble pie.

I messed up on the MySQL permissions.  I thought I'd tested them, but clearly not.  Apologies.

Cheers

 

PAE

In reply to Peter Bradley

Re: [solved] Cannot install moodle on local host (cannot create database)

by Stuart Morrison -

Pleased you managed to sort it.

Happy moodling

In reply to Stuart Morrison

Re: [solved] Cannot install moodle on local host (cannot create database)

by yogesh nagarajan -

Intl extension is used to improve internationalization support, such as locale aware sorting. 

 How to solve this error?

In reply to yogesh nagarajan

Re: [solved] Cannot install moodle on local host (cannot create database)

by Luis de Vasconcelos -
Picture of Particularly helpful Moodlers

Enable the php_intl extension in your php.ini file. Then restart your web server.