Jump to content

Recommended Posts

Posted

I've upgraded MySQL from 5.1 to 5.5, in preparation for upgrading to the latest version of Moodle. After backing up the Moodle DB using PHPmyadmin, uninstalling MySQL 5.1 and installing 5.5, I've then restored the moodle DB using PHPmyadmin and added a user, granting all privileges to the database. I've then run mysql_upgrade on the db. When I try to browse to Moodle I get the following errror:

 

Error: Database connection failed

 

It is possible that the database is overloaded or otherwise not running properly.

 

The site administrator should also check that the database details have been correctly specified in config.php

 

I've checked the details in config.php and they've not changed, so I'm at a loss what to do. I'm on Windows 2008 R2.

 

Can anyone let me have some advice?

 

Thanks,

 

Michael

Posted

Can you connect to the database using the cmd prompt? Something like c:\Program Files\MySQL\MySQL Server 5.5\bin\mysql.exe -D moodle -u moodleuser -p

Also connect as root, and look at the users & db tables, making sure all of the grants are correct.

Posted
Thanks for the suggestion - I can connect both as root and moodleuser, via command prompt. I've checked the privileges on the db and granted full moodleuser
Posted
Here's a really off the wall suggestion, but it has helped me in the past. Install Apache and use that rather than IIS. You might see something of use in the error log. I had to do this when IIS was reporting a 500 error but not logging any more than that.
  • 4 weeks later...
Posted

I've just had the same issue. I'm not at all familiar with MySQL so had me stuck for a while.

 

My solution was to use the MySQL workbench to import the moodle schema from the backup sql file (had to create a moodle schema to restore to). Recreate the moodleuser account and just gave it full DBA privileges (I don't know what it's supposed to have, but I'll correct that later).

 

It looks like you may have tried all this, so sorry if this doesn't help.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...