LMSouq
moodle-core Open

moodle - database connection failed when running sync.php script

NU
Nuraini
1 month ago
3 views
Problem Description
I am setting up a moodle plugin for enrolment from an external database based on instruction in https://docs.moodle.org/39/en/External_database_enrolment. I was successful in setting up a similar plugin for authentication from an external database. But I am having a problem with a plugin for enrolment from the external database. When I test the plugin settings it is successful as shown below https://i.sstatic.net/fdrqG.png But When I run php sync.php I got <p>Error: Database connection failed</p> <p>It is possible that the database is overloaded or otherwise not running properly.</p> <p>The site administrator should also check that the database details have been correctly specified in config.php</p> My moodle version is 3.9.1 and I am using Mac OS. Thank you in advance.

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base