config and database connections please

config and database connections please

by Mrs. Kaltenberg MAK -
Number of replies: 4

The following is the error I'm receiving.

Error: Moodle could not connect to the database.

It's possible the database itself is just not working at the moment.

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

Database host: localhost
Database name: moodle
Database user: root

Prior to this message, I was receiving T_String parse errors...that seem to have been rectified; however above is my newest challenge.  I've lost a lot of sleep of this, but I'm there is someone with a simple solution - opening the gates for course creations big grin

Let me know if you need config.php code or what I need to do to tackle this. 

Thx much for the help!  M-

Average of ratings: -
In reply to Mrs. Kaltenberg MAK

Re: config and database connections please

by Jan Dierckx -

Are you installing moodle on a server from a hosting company or on your local pc?

If the former is the case, you might want to know that there is an easy-install package for Moodle. Takes care of everything: www.goohio.com/moodle

If the latter: your hosting company should have provided you with a MySQL database you can use. When i signed up with a hosting company they sent me an email with: a username /password combination for the database, the name of the database and the place where it was hosted (something like 'mysql.hostingcompany.com')

You need to enter this information in the config.php- file. If you encounter more problems and want to submit your config.php, make sure you remove / replace  your password.

Good luck

 

In reply to Jan Dierckx

Re: config and database connections please

by Mrs. Kaltenberg MAK -

I've tried to install from my hosting company to no avail.  It's my preference to install from my pc if possible.  I did follow your advice and reinstalled using www.goohio.com/moodle.

I ran into a couple of different issues and errors, and managed to work those out, however I'm still running into the same problem:

 Error: Moodle could not connect to the database.

It's possible the database itself is just not working at the moment.

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

Database host: localhost
Database name: moodle
Database user: root

Perhaps if I could better understand:  does the software I downloaded from the above site have the appropriate database created already?  Where is it located?  And shouldn't the software already know where to look for it?  Okay, if I need to create a database, where would be the most appropriate place to put it so it's found?  Do I need to make any changes to config.php in respect to the location of the database?  Does want to refer to a uploaded database or localhost?

I'm sorry I don't mean to be so obtuse...this has been challenging, however I usually manage to work through things okay...maybe a little more understanding of the process would help troubleshooting.  I have read the forum's with regard to the file referencing etc, so I understand that much.  Thx so much for your help.  M-