Databases: Database crashed

Databases: Database crashed

by Abhinav arya -
Number of replies: 4

Recently one of our moodle implementation in a college is failed becoz every time any user open moodle application it give error tht canot connect to the database.

I check tht Mysql database server and it was working fine.

i didnt got the reason why it happen. I am using Linux based moodle 1.5.1.

If any one faced the similar problem plz contact me at arya.abhinav@gmail.com

Thanks

Average of ratings: -
In reply to Abhinav arya

Re: Databases: Database crashed

by Robert Saari -

For whatever reason, your instance of Moodle cannot find the database.  In my experience, the most likely reasons are:

  • Moodle's config.php file is corrupt, not pointing to the database, or is configured incorrectly
  • Changes to the server or network configuration are preventing the web site from finding the database (did your network or server teams implement anything new?)

Search this forum for "cannot connect to database".  There are a lot of good postings that will help you troubleshoot your problem.

In reply to Robert Saari

Re: Databases: Database crashed

by Martín Langhoff -
Yes - search this forum - you'll find that the most frequent case is one of corrupt indexes, and running myisamchk will fix it.
In reply to Martín Langhoff

Re: Databases: Database crashed

by Abhinav arya -

Our database team didnt do any thing new on the server. Actually it was a separate server dedicated to the moodle. When i first see the problem ill go through all these forums and try to figure out the problem.

I check the config file but it was working fine.

In reply to Abhinav arya

Re: Databases: Database crashed

by Tariq Adel Al Ammadi -
I would proceed like so:
  • On the machine acting as a web server, attempt to connect to the database using the settings from your config.php file: So something like the following (assuming you have a mysql-client installed on your server):

/usr/local/mysql/bin/mysql -h <your_host> -u <your_username> -p <your_database>


If you cannot connect to the database this way then the user you are connecting as may not have permissions from the web server's ip. In a mysql session try:

GRANT ALL ON <your_database>.* to '<your_username>'@'<your_webserver_ip>' IDENTIFIED BY '<your_password>'


At least now you will know if your web server can talk to your database server.