Main databases NOT set up successfully

Main databases NOT set up successfully

by ahmet simsek -
Number of replies: 4

I have an installation problem:

LINUX fedora, MySql, Apache are my environment. I have edddited /etc/my.cnf of MySql:  sql_mode=''.   

First I have tried to install 1.8.2+ later the 1.9+ Beta, both with same result as:

--------------------------------------------------------------------------------
(mysql): SHOW VARIABLES LIKE 'character_set_database'  
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql): SELECT name FROM mdl_config WHERE name = 'unicodedb' LIMIT 1  
--------------------------------------------------------------------------------
1146: Table 'moodle.mdl_config' doesn't exist

               ADOConnection._Execute(SELECT name FROM mdl_config WHERE name = 'unicodedb' LIMIT 1, false) % line  891, file: adodb.inc.php
            ADOConnection.Execute(SELECT name FROM mdl_config WHERE name = 'unicodedb' LIMIT 1, false) % line  496, file: adodb-mysql.inc.php
         ADODB_mysql.SelectLimit(SELECT name FROM mdl_config WHERE name = 'unicodedb', 1, -1) % line  672, file: dmllib.php
      get_recordset_sql(SELECT name FROM mdl_config WHERE name = 'unicodedb', 0, 1) % line 1086, file: dmllib.php
   get_field_sql(SELECT name FROM mdl_config WHERE name = 'unicodedb') % line 1050, file: dmllib.php

--------------------------------------------------------------------------------
(mysql): SELECT * FROM mdl_config WHERE id = '-1'  
--------------------------------------------------------------------------------
1146: Table 'moodle.mdl_config' doesn't exist

      ADOConnection._Execute(SELECT * FROM mdl_config WHERE id = '-1', false) % line  891, file: adodb.inc.php
   ADOConnection.Execute(SELECT * FROM mdl_config WHERE id = '-1') % line 1389, file: dmllib.php
insert_record(config, Object:object) % line  620, file: moodlelib.php
set_config(unicodedb, 1) % line  190, file: index.php


Error: Main databases NOT set up successfully

Any suggestion? Do I miss some permissons?

Thanks in advance

Ahmet Simsek

Average of ratings: -
In reply to ahmet simsek

Re: Main databases NOT set up successfully

by Richard Enison -

AS,

The most obvious possibility is, maybe the database user you gave Moodle doesn't have the right to create tables. It appears it wasn't able to create mdl_config; it probably wasn't able to create any of the other tables either.

There may be other rights it is missing also, but that's where I'd start. It also needs the right to create indexes. EDIT: See http://docs.moodle.org/en/Installing_Moodle#Using_the_command_line for a list of rights to GRANT to your user.

RLE

PS It's good that you have turned off strict mode (sql_mode=''), but I don't think that is involved in this problem.

In reply to Richard Enison

Re: Main databases NOT set up successfully

by ahmet simsek -

Hi Richard,

Thanks for your comments, that was what I meant with "something fishy with permissons". I guess I got confused with the root user of the system and of mysql. I will seperate these and will post what happened.

best,

Ahmet

In reply to Richard Enison

Re: Main databases NOT set up successfully

by ahmet simsek -

RE,

Nope, still stuck:

Let me give more info:

Environment: LINUX, MySql 5.0.45, PHP ver 5.1.16

php.config :  

$CFG->dbuser='emir';

$CFG->dbpass='1234';

$CFG->prefix='mdl_';

$CFG->dataroot='/usr/moodle_data';

$CFG->directorypermissions='admin';

----------------------------------------

my.cnf :

[client]

user =emir

password=1234

[mysqld]

user =mysql

sql_mode=''

So far the conf files

chown -R apache:apache moodle_data is executed.

The mysql user 'emir' has all the moodle db specific rights s.a  select,insert, drop,... ,create temp. tables etc.

Any further help appreciated.

Ahmet

In reply to Richard Enison

Re: Main databases NOT set up successfully

by ahmet simsek -

Hi,

I discovered one php library wasn't properly installed. Now I passed the graphical installation up to the last step where the installation windows shows up and it says: 

"  We are checking if the various components of your system meet the system requirements ..."  , no further progress.

I manualy and succesfully created for testing purpuses the course table as it was give as a sample in the installation docs.  I used the same username and password I submited to the installation interface.

For the moodledata folder : chmod -R 0770 moodledata executed.

Is the installation always that painfull?

Any suggestion will be appreciated.

Thanks

AS