A few basic installation questions

A few basic installation questions

by Lizard- Gizzard -
Number of replies: 18

ISS 5 on Win 2000 with PHP5

I am at the part of the installation that configures the database.

I have mysql and postres7 - which one should I use. mysql says php neds to be configured. Postrgres7 goes through but tells me it can't connect to the database specified.

My simple questions:

should I be using mysql or postgres7?

The host server - what do I need to put in here: IP address, web address, name of the server?

And if postgres is actually working (I've never heard of it before), why can't I connect to the database specified. There seems to be nowhere to enter a path to tell Moodle where the database is. Is it in moodledata?

Thanks

Average of ratings: -
In reply to Lizard- Gizzard

Re: A few basic installation questions

by Lizard- Gizzard -

Okay - I have  now got mysql working, but am stumped on why I get this message:

'We could not connect to the database you specified. Please check your database settings.'

Do I need tp specify the full path to the database or not? Any help? I'm sure these are simple installation questions

In reply to Lizard- Gizzard

Re: A few basic installation questions

by Lizard- Gizzard -

Come on guys, I'm sitting here like a lemon... blush Could really use some input.

In reply to Lizard- Gizzard

Re: A few basic installation questions

by Ken Wilson -

Hi Lizard (or is it Gizzard - great forum name by the way!)

Have you tried the obvious:

1. Check that the username/password combination is correct to connect to the database?

2. Check that MySQL allows connections from the localhost?

We're running W2K3, IIS6 and MySQL5 and have had no problems - just following the standard setup instructions on the Moodle site.

Le us know how you get on.

Ken

In reply to Ken Wilson

Re: A few basic installation questions

by Lizard- Gizzard -

Hi Ken,

I think the problem is not really knowing how to set up a username and a password for the database. I'm using Access 2003.

As for checking that MySQL allows connections form the local host - how would I go about doing that? is there a toghgle in the .dll?

I've edited the config file directly, placed moodle.mdb in Moodledata folder and can't seem to see why it's not working. here is my actual config just in case I've done something dim (obviously I've asterixed the password):

$CFG->dbtype = 'mysql';

$CFG->dbhost = 'localhost';

$CFG->dbname = 'moodle';

$CFG->dbuser = 'admin';

$CFG->dbpass = '****';

$CFG->prefix = 'mdl_';

I'm confused that the database name does not have any postfix e.g. moodle.mdb?

Anything obvious I'm missing?

 

In reply to Lizard- Gizzard

Re: A few basic installation questions

by Maik Riecken -
Hi Lizard,

You can't use Access with moodle. Only PostgreSQL and MySQL are supported. Authentication is possible  with Access, but nothing else.

I seems that you need to install MySQL/PostgreSQL first.

regards,

Maik
In reply to Lizard- Gizzard

Re: A few basic installation questions

by Ken Wilson -

Lizard

As Maik says, currently moodle is sql-aware only, so you're going to have to install My SQL. Here are some instructions from our Ops Guide:

This process should take 30 minutes.

Moodle.org and MySQL.org websites recommend setting MySQL using InnoDB for better performance. InnoDB also has transactional logging, which allows changes to be rolled-back.

1. Download the following from the MySQL website (www.mysql.org):
- MySQL full package (not essentials!) for the Windows Installer Package
- MySQL Administrator.

2. Install MySQL
- Install MySQL (typical) from the Windows Installer Package.
- Choose Complete Install, Configure MySQL.
- Skip sign-up.
- Use these settings for the next set of configuration screens:
- detailed configuration,
- server machine,
- multi-functional database,
- set INNODB to c:\MySQL Data files\, (or preferably on a different disk with enough space – database drive)
- OLTP (for heavily loaded connection),
- Remove strict mode tick as this is known to break Moodle,
- Include BIN directory in windows path,
- Execute to start
- Set root password.
- Open the MySQL command prompt, log in and enter the following commands:

CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; <PRESS ENTER>

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER ON moodle.* TO moodleuser@localhost IDENTIFIED BY 'yourpassword'; <PRESS ENTER>
SET @@global.sql_mode=''; <PRESS ENTER>

Quit <PRESS ENTER>


- Open the Windows command prompt and type:
mysqladmin –u root -p flush-privileges

This will get MySQL database installed. Next install MySQL Administrator which is a front-end to allow you to edit the ini file. Note that these are suggested setting only (you may need to adjust for your system):

3. Install MySQL Admin on the server.
- Install from the download using the install defaults.

4. Tune MySQL as follows.
- Start the MySQL Admin program and enter the server as localhost and the user/pass combination root/password. You should see a screen like this:
- Click Service Control tab -> Configure Service and set the server to use the MAX server by making the settings as follows. Set the InnoDB usage and change the binary to mysqld-max-nt.
- Open Task Manager and find out how much free physical memory you have.
- Now set the startup variables as follows:
- In General Parameters:
- Set the Key_buffer size to 64Mb per 256Mb of free memory (from above)
- Set Default storage to InnoDB.
- Apply changes.
- In InnoDB Parameters,
- Set the Buffer Pool Size as shown on the screen to 80% of available memory:
- In Performance, set the cache size to 4096k to cache query results.
- Click Apply Changes.
- Start and stop the mysql service using the Service Control tab.

That should be it for MySQL.

Let us know how you get on.

Ken


In reply to Ken Wilson

Re: A few basic installation questions

by Lizard- Gizzard -

Thanks ken,

Get as far as:

SET @@global.sql_mode=''; <PRESS ENTER>

I then get a   ">  prompt which when I type 'Quit' - nothing happens. Sop I just close the window.

I went on to install administrator and 'The system can't find the file specified' message appears and then it...dies sad

L

In reply to Lizard- Gizzard

Re: A few basic installation questions

by Lizard- Gizzard -

Hi,

I can config moodle database now (but still did not manage to install mySQL admin as previous message) it connects to the database but will not load 'moodle/admin/index.php' and gives the message 'page cannot be found' - but I can see it's there! Heh.

Friday aftrenoon, it hot and I've got a headache. I know it's free but why is nothing straightforward in moodle? Oh well, it will all seem better on Monday, but if you can enlighten me further during the last vestigaes of my working day I would be most happy...

L

In reply to Lizard- Gizzard

Re: A few basic installation questions

by Maik Riecken -
Hi Lizard,

I think it is better, you will use one of the complete install packages for windows (have a look to moodle downloads). You have to remove or to disable your installation of IIS + PHP (MySQL) then. Otherwise you will run into trouble configuring and hardening MySQL.

regards,

Maik



In reply to Maik Riecken

Re: A few basic installation questions

by Lizard- Gizzard -

Hi Maik,

That's a 'no' but thanx - I'm not about to remove my present IIS installation. I'm trying to install Moodle to see if it is what we want, and would prefer to get it up and running without having to reinstall everything.

So any other suggestions - it's one all by the way and extra time Germany vs Argentina - I'm not a saddo - it's just before extra time starts - just enough time for a quick check of the emails, heh...

L

In reply to Lizard- Gizzard

Re: A few basic installation questions

by Ken Wilson -

Hi Lizard

Glad to see that you've managed to make some progess - it's demanding work but your users will thank you for it as moodle is very easy for them to use (but just difficult to set up!)

When you downloaded the MySQL Administrator from http://dev.mysql.com/downloads/administrator/1.1.html did you download also the Windows Installer runtime (http://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe). This is needed if you have Windows 2000 as the administrator uses the windows installer. You've probably got the windows installer on your server anyway, but please have another go.

A few things to check in the moodle directory: your CFG->wwwroot is pointing to the moodle directory itself, and the Anonymous Internet user has access to this directory. Not being able to access admin.php sounds like a permissions problem.

Ken

In reply to Ken Wilson

Re: A few basic installation questions

by Lizard- Gizzard -

Hi Ken,

Yes, I have the windows installer.

CFG->wwwroot is pointing to the moodle directory itself.

Permissions. Which directory - the Admin Directory? Moodle has the same permissions for 'Everybody' as the rest of the website. Read, List, Execute.

Permissions aren't my hottest subject. Is there sopmething basic that I have missed out during the installation? Do Moodle permisoons need to be set differently?

Even hotter today! I really am stuck. Didn't my earlier post throw any light on what went wrong? Why can't I install the admin program? And why I got as far as:

SET @@global.sql_mode=''; <PRESS ENTER>

geting a   ">  prompt which ignored my Quit command (from your excellent instructions) leading me to just close this box wondering if everything had executed or not?

Please feel free to email me directly if you think it might help.

L

 

In reply to Lizard- Gizzard

Re: A few basic installation questions

by Ken Wilson -

Hi Lizard

The permissions that we have on the moodle directory are:

Administrators: Full Control
Authenticated Users: Read & Execute, List Folder Contents, Read
CREATOR OWNER: Special Permissions (Full control on subfolders)
SYSTEM: Full Control
Users: Read & Execute, List Folder Contents, Read, Special Permissions

Be sure to remove access for "everyone" - as this could be a security issue (!)

One thing that comes to mind with permissions: are you logged in as the administrator of the computer when you are doing the installation? If not, make sure you do.

As for the MySQL problem, can you remember what the response was when you typed SET @@global.sql_mode=''; at the mysql prompt? You should have got:

Query OK, 0 rows affected (0.01 sec) - or something similar.

As long as you get query OK, then everything has run fine. Just to check, go back to the mysql prompt and type SHOW DATABASES; (don't forget the semi-colon). You should see the moodle database listed (if it isn't go back to the instructions and try creating it again).

Can you please have a go and let me know how you get on.

Ken

 

 

In reply to Ken Wilson

Re: A few basic installation questions

by Lizard- Gizzard -

Have SQL and SQLadmin, and PHP up and running now. Many thanks.

However, I cannot get to the admin page. I get a 404 page could not be found. Is this a permissions problem? It has the same permissions as the rest of the moodle directory and website and it won't make an appearence.

This might be useful: php info: http://pcc-web.com/moodle/info.php

L

 

In reply to Lizard- Gizzard

Re: A few basic installation questions

by Ken Wilson -

Lizard

What did you do to get SQL, SQLadmin and PHP running? (It would be useful for anyone following this thread in future to know what was wrong)

Given that I can load the info.php page without any problems, this implies that permissions are OK.

Checking the index.php, when moodle starts-up, it loads this part:

if (empty($SITE)) {

redirect($CFG->wwwroot .'/'. $CFG->admin .'/index.php');

}

So the next stage would be to check what these variables are and try to expand the part in the redirect statement brackets. Put the result in a browser address bar and see what happens. If there is a problem, then it's something with these variables.

Otherwise, Lizard, I'm sorry but you'll probably need to start again with a fresh install.

Ken

PS: Best to delete the info.php from the moodle directory now for security purposes!

In reply to Ken Wilson

Re: A few basic installation questions

by Lizard- Gizzard -

Hi,

Uninstalled mySQL and mySQLadmin, uninstalled PHP. Deleted Moodle (or tried to), restarted and I cannot delete the admin folder/admin.php as is is being used by 'another program'. What program is this and is there any other way of stopping it using the admin.php file? If it's not PHP or MySQL what the hell is it?

Getting a tadge peed off with this now. A lot of people waiting for this to be installed and I can't seem to get a basic installation in place.

Can anybody shed a bit of light onto what is going on?

In reply to Lizard- Gizzard

Re: A few basic installation questions

by Lizard- Gizzard -
Hi Cold reboot has sorted it - have no idea why, but back on track - please ignore above