Jump to content

Recommended Posts

Posted

I'm trying to set up a Moodle box.

 

I've edited the config.php to relect the correct detail, but when I goto to the web page, I get this error:

 

"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"

 

Can anyone help please!

 

EDIT: I've sussed this problem, but be prepared for more!!!

Posted

On the database side of things check:

 

1. The database server is running.

2. the moodle database has been created

3. the moodle database user has been created, assigned a password and host access.

4. the moodle database user has correct access to the moodle database

 

On the moodle side of things check:

 

1. There's actual network connectivity between your webserver and database server.

2. PHP has support for your database server compiled in.

3. The config.php has the correct server address and database type set for your database server.

4. The config.php has the correct username/password for your moodle database.

5. There's no spurious spaces or blank lines after the last character in the config.php

Posted

the solution to my problem was:

 

when I altered the config.php, I gave "root" access to the db, AND i typed in the root password. I had to leave the p/wrd blank!

 

Now of course, I have different problems :evil:

Posted
when I altered the config.php, I gave "root" access to the db, AND i typed in the root password. I had to leave the p/wrd blank!

 

Bad! You just failed Linux Database Security 101 on two counts:

 

1. The database root user has no password.

2. Moodle is using the root user account.

 

Why?

 

1. anyone logging on to a shell can do what they want with your databases.

 

2. If there's an exploit in moodle that allows access to the underlying database server an attacker can gain access to any database on the database server.

 

Recommendations are:

 

1. Set a password for the database server root user. Preferably a long (12+ characters) one containing numbers letters (upper and lower case) and special charaters. Check if your distro has the 'makepasswd' tool for automatically generating strong passwords.

 

2. Create a moodle database user with a strong password (see above) that only has access to the moodle database on the database server.

 

3. Setup host based access for your database users. If everthings on one machine 'localhost' is sufficent.

Posted

I know I commited the cardinal sin, but it's a machine only I have access to, and then, if I can get the bloody thing to work, I'll change the settings.

 

I've got to the point where it should be asking me to create a toplevel administrator, but it's not, the page is blank. Any ideas Geoff?

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...