Forums | Mahara Community
Support
/
cannot set $cfg->dbtype = 'mysql5';
26 May 2013, 14:26
Hi,
on a local machine, the installer keeps asking for postgresql even though I set it to $cfg->dbtype = 'mysql5';
The error is below:
Mahara: Site unavailable
* If you are using Mahara, please wait a minute and try again
* If you are the administrator, please check your database settings and make sure your database is available
The error received was:
mysql error: [1231: Variable 'sql_mode' can't be set to the value of 'POSTGRESQL'] in EXECUTE("SET SQL_MODE='POSTGRESQL'")
26 May 2013, 22:01
Hello Dirk,
Sorry to hear about your connection problem. I know you are not novice in Mahara, but, as stupid it may seem to be, may I suggest to check your config.php once again. I would suggest to start with a fresh config.php form the git and edit it accordingly. Check you database name, username and password. At the first sight I would think that your config.php contains a typo error somewhere.
If this doesn't work, please come back here.
Regards,
-dajan
27 May 2013, 3:04
Thank you Dajan,
the problem was the database collation. It was set to utf16_general_ci and had to be changed to utf8_general_ci for it to work. I am slowly weaning myself off GUI tools but keep making new databases with phpmyadmin. On this new computer I am working with, for some reason the default collation is UTF16 when I choose UTF.
After I did a git clone (git clone git://gitorious.org/mahara/mahara.git ) and it still was not working I looked at the database a little more closely. Had I followed the instructions here https://wiki.mahara.org/index.php/System_Administrator%27s_Guide/Installing_Mahara a little more closely, I would have noticed that UTF8 is required.
Thanks again.
Dirk
27 May 2013, 4:13
I should add that a previously working database which was exported and then imported using the command line was not working also as the collation seems to have changed during import.
27 May 2013, 7:51
Hi Dirk
Happy you found the error. I will add this to my personal database of problems<->solutions. Thanks for this.
Regards,
-dajan
27 May 2013, 12:16
Thanks for the info, Dirk. I've filed a bug to see about adding this to the environment sanity check Mahara does, so that users will get a more useful error message. :)
https://bugs.launchpad.net/mahara/+bug/1184450
Cheers,
Aaron