Forums | Mahara Community

Developers /
Not able to install mahara


anonymous profile picture
Account deleted
Posts: 2

28 May 2013, 0:37

Will installing I am getting the below error , can anyone provide solution

 

 

:( Could not execute command: CREATE TABLE config ( field VARCHAR(255) NOT NULL, value TEXT, CONSTRAINT PRIMARY KEY (field) )ENGINE=innodb
Call stack (most recent first):
  • execute_sql("CREATE TABLE config ( field VARCHAR(255) NOT N...") atD:\xampp\htdocs\mahara\lib\dml.php:1403
  • execute_sql_arr(array(size 122)) at D:\xampp\htdocs\mahara\lib\ddl.php:645
  • install_from_xmldb_file("D:\xampp\htdocs\mahara/lib/db/install.xml") atD:\xampp\htdocs\mahara\lib\upgrade.php:297
  • upgrade_core(object(stdClass)) at D:\xampp\htdocs\mahara\admin\upgrade.json.php:94

 

 

Even I drop database and recreate the database but still its don't work.

 

Please suggest some solution.

Aaron Wells's profile picture
Posts: 896

28 May 2013, 11:25

Make sure the database user you supplied in config.php has sufficient permissions to create tables. You can verify this by connecting up to the database using the username and password you supplied in config.php, and then run the database query yourself:

CREATE TABLE config ( field VARCHAR(255) NOT NULL, value TEXT, CONSTRAINT PRIMARY KEY (field) )ENGINE=innodb;

That might also give you a more specific error message.

Good luck! Smile

anonymous profile picture
Account deleted
Posts: 2

28 May 2013, 16:46

Thanks for your responce Aaron.

All the connection which I have given in config is proper and also has permissions to create table, even It is create some table (i.e some time 94 table sometime 103 table). I have also execute the below query manually it working fine. But will installing I am not able to complete the whole process. 

CREATE TABLE config ( field VARCHAR(255) NOT NULL, value TEXT, CONSTRAINT PRIMARY KEY (field) )ENGINE=innodb;

Can u suggest some another solution.

Aaron Wells's profile picture
Posts: 896

29 May 2013, 12:12

What you really need is to find out the error message that MySQL is giving when you try to execute the command. That should tell you why it's not able to do it. (The string "Could not execute command" comes from Mahara.)

Mahara prints the raw exception from the DB using log_debug(). By default this will get printed into your PHP error log (the location of which varies depending on your system config; in Ubuntu it'll be merged into the Apache error log by default, which is at /var/log/apache2/error.log). Or you can tell Mahara to print it to the screen by setting $cfg->productionmode = false in 1.7, or by adding this to your config.php if you're using a version earlier than 1.7:

$cfg->log_dbg_targets     = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_info_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_warn_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;

Cheers,
Aaron

4 results