Koozali.org: home of the SME Server

Obsolete Releases => SME 8.x Contribs => Topic started by: kenwrites on November 28, 2013, 03:31:29 AM

Title: Moodle fails to connect to MySQL database
Post by: kenwrites on November 28, 2013, 03:31:29 AM
Hello all,

I just attempted to install Moodle, and the install seemed to go well, but now when I try to access it from another computer on my local network I get this error:

Quote
Error: Database connection failed.
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php

I modified the config file per the instructions in http://wiki.contribs.org/Moodle  Double-checked the dbpassword.  Also tried rebooting the server - no joy. 

In case it matters: 

Any thoughts? 

-----
A note for others attempting to install Moodle for the first time:  check how to install the sm7contribs repo at http://wiki.contribs.org/SME8.0_Contribs_QA  You'll need it in order to install. 
Title: Re: Moodle fails to connect to MySQL database
Post by: janet on November 28, 2013, 05:49:00 AM
kenwrites

I'm pretty sure you need to address/access Moodle with a valid domain style URL.
That URL is configured in Moodle settings & you cannot access Moodle if it is not setup correctly with the right (& valid) domain name.
So using a local IP is not likely to work.

Title: Re: Moodle fails to connect to MySQL database
Post by: kenwrites on November 29, 2013, 06:35:14 AM
OK - thanks for the tip. 

I'll try to get my server set up with a domain style URL, then.  I believe dyndns now charges for their services, so I'll try to set up dynamic DNS through dnsdynamic.com. 

Will post results!
Title: Re: Moodle fails to connect to MySQL database
Post by: janet on November 29, 2013, 11:20:59 AM
kenwrites

For testing purposes, you can create any domain name you want in the admin console/Configure this server option (in a valid format eg mytestdomain.com), as the main domain name for your sme server.
Then set that domain name to resolve locally in server manager Domains panel, so that it does not need to be a real domain as far as external Internet users are concerned. You just want it to be resolvable locally on your LAN for test purposes. If sme is not your LAN (proxy) gateway, then point your browser proxy at the sme server IP.

Quote
I believe dyndns now charges for their services, so I'll try to set up dynamic DNS through dnsdynamic.com

Pretty sure dyndns still allow 1 domain name for free per unique registered user, but you need to supply a credit card at registration time (it will not be charged unless you add more than 1 domain).
So you can still avail of a free dynamic domain at dyndyns.
Title: Re: Moodle fails to connect to MySQL database
Post by: kenwrites on December 08, 2013, 09:05:35 PM
Janet,

Thanks so much for the info.  I'll keep that in mind that I can set up a test domain and have it resolve locally. 

And thanks for info on dyndns.org.  Might try that out soon. 

For now, I have dynamic dns set up through No-IP, with a different computer on my LAN updating the IP.  And it does work - that seems to have gotten Moodle up and running! 

This could be a big help.  I'm looking to get a job providing feedback on courses designed in Moodle, and it'll help to have a portfolio in Moodle.  Muchas gracias!