Problem Description
I am using [moodle](http://www.moodle.org) and I change location of my web site, but I am facing this error.
My config.php is:
<?php /// Moodle Configuration File
unset($CFG);
$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'lightsys_test';
$CFG->dbuser = 'lightsys_test';
$CFG->dbpass = '123456a';
$CFG->dbpersist = false;
$CFG->prefix = 'mdl_';
$CFG->wwwroot = 'http://www.lightsystem.ir/aya/moodle';
$CFG->dirroot = '/home/lightsys/public_html/aya/moodle';
$CFG->dataroot = '/home/lightsys/public_html/aya/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 00777; // try 02777 on a server in Safe Mode
require_once("$CFG->dirroot/lib/setup.php");
// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
// /home/lightsys/public_html/aya/moodle/
?>
And my error is:
>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
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?