Another day, another database

Another day, another database

by Kieran Foley -
Number of replies: 5
Well, I decided to shell out some dosh for a MySql hosting system.

Try to run the install but am getting the following errors:

Warning: Access denied for user: 'moodleuser@localhost' (Using password: YES) in /home/cognetic/public_html/moodle/lib/adodb/drivers/adodb-mysql.inc.php on line 120

(This error seems to be about use of passwords; I have set it up in config.sys o.k., so Im baffled)


Warning: Cannot send session cookie - headers already sent by (output started at /home/cognetic/public_html/moodle/lib/adodb/drivers/adodb-mysql.inc.php:120) in /home/cognetic/public_html/moodle/lib/setup.php on line 90

Warning: Cannot send session cache limiter - headers already sent (output started at /home/cognetic/public_html/moodle/lib/adodb/drivers/adodb-mysql.inc.php:120) in /home/cognetic/public_html/moodle/lib/setup.php on line 90

(Here I have tried deleteing temp internet files / closing reopening browser etc before re-running the admin/index.php)

The GPL Agreement is shown underneath the above error messages - When I click on Accept - it goes through with many more error messages until I get a Database Completed message!
Average of ratings: -
In reply to Kieran Foley

Re: Another day, another database

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
The only problem here is that the username and password you've specified in config.php are not working -- the other messages are just a consequence of this. Doublecheck these three settings:

$CFG->dbname = "databasename";
$CFG->dbuser = "username";
$CFG->dbpass = "password";

ALso try installing the MySQL web admin module to give you a web-view of your database and perhaps help you debug the problem (it uses the database settings out of config.php).

http://moodle.com/download/moodle-mysql-admin.zip
(you just unzip it in the admin directory)

Then go directly to :

http://yoursite/admin/mysql/

In reply to Martin Dougiamas

Re: Another day, another database

by Kieran Foley -
Well, success in the end big grin - but what a journey!

Here are some things I learned - these may only be useful to people who have have a hosted system rather than their own server and /or know zero about pHp MySql (like me!)

Get a list of the requirements and send it to your hosting company BEFORE doing ANY installation. The biggest host in the UK boasts a flagship Linux hosting service - they dont tell you it is PhP v4.06 (!) with no gd library!

Check out that your host allows cron - it can really hammer a server - some hosts will ban you instantly if it is overused!

Some host companies have already installed a cut down version of phpAdmin. The installation of the moodle /mysql/admin may not be possible.

When you create a database, the host company may add a prefix to it.
For example I created
database: moodle and
username: moodleuser

These however show up in mysql as
database: cognetic_moodle
username: cognetic_moodleu (yes, it was truncated AND pre-fixed!)

the password, however, has no prefix.

These are the database name and username you may need in config.php, rather than moodle and moodleuser, -even though- you created a database called moodle with a user called moodleuser in MySql.

Be aware also that FTP itself may cause some issues, be particularly careful if you use the popular Terrapin package: sometimes changes may not get overwritten on the server, even though files show as having uploaded.

BTW Moodle, (when I finally got there!) is GREAT!

Hope these help
Kieran
In reply to Kieran Foley

Re: Another day, another database

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Wow ... what an epic! Thanks for the story - I'll certainly keep it in mind while working on features.

I'm glad (hope) Moodle was worth all that trouble!

(BTW, Moodle's cron jobs shouldn't be putting much load on a server at all. If 5 minutes is a problem, you could easily change it to 10 or 15 minutes without losing much functionality)
In reply to Martin Dougiamas

Re: Another day, another database

by James Miller -
I'm having trouble with db authentication which I'm sure is user error but asked for some help on in the admin forum...

config.php and my GRANT's to db match.. also looks like to some problems with the ServerName or Virtual Host directives in httpd.conf not resolving requests internernally correctly..

ug. I'll look at it tonight..
In reply to Kieran Foley

Re: Another day, another database

by Mick Thorn -

Kieran

my experience of setting moodle up on a primary school UK website

is going similarly to your own...

it's be good to have your email address in case I run into any probs that I think you might be able to help with

 

currently trying to sort out the GD library setting

 

Mick Thorn

hawktalk@hawkesfarm.e-sussex.sch.uk