Enrolment Plugin - Mooddle - Gibbon integration connection failing

Enrolment Plugin - Mooddle - Gibbon integration connection failing

by Raphael Muonga -
Number of replies: 1

I cannot get the Enrolment plugin to work to connect Moodle to another remote GIBBON School System Database.

The two domains apparently are hosted on the same shared server.

The authentication plugin is working fine when you click Test in its Manage Authentication Plugins

But for Manage Enrolment Plugins, it is returning the following error;

Warning: mysqli_real_connect(): (28000/1045): Access denied for user ' ic13557d_chisang'@'localhost' (using password: YES) in /home/ic021827/public_html/lib/adodb/drivers/adodb-mysqli.inc.php on line 124
Could't connect :
localhost: Access denied for user ' ic13557d_chisang'@'localhost' (using password: YES)
Cannot connect the database.


I have tried to change password both in phpmysql and the config file but to no avail.
I have indicated the external domain the ip address for the remote database but still not working.


The two domains/websites are being hosted on the same server with the same IP address.
The testing of the Authentication plugins is working fine and is indicating the fields for remote database using the same username, user password and database name as those for Enrolment plugins

The result of Test settings is as follows:-

Test authentication settings - External database
(mysqli): SELECT * FROM moodleUser WHERE username <> 'random_unlikely_username'
External table contains following columns:
username, preferredName, surname, email, website


So why is it failing for Test Setting in the Enrolment Plugins?

Could it be because I am trying to have access remote MySQL connections in cPanel shared hosting ?

I have tried to Google but I cannot easily get anything working.


The following are the environments

Moodle version 3.2(Build: 20161205)
mysql 5.5.6-cll
php 7.1.30


Gibbon version 17.0.00
mysql 5.5.61-cll   but requires 5.6+
php 7.3.6


Anyone with the solution, please help me as I cannot find the solution yet!!

Regards
Raphael Chisanga


Average of ratings: -
In reply to Raphael Muonga

Re: Enrolment Plugin - Mooddle - Gibbon integration connection failing

by Ken Task -
Picture of Particularly helpful Moodlers

The warning/error you've shared
mysqli_real_connect(): (28000/1045): Access denied for user '
localhost: Access denied for user ' ic13557d_chisang'@'localhost' (using password: YES)
Cannot connect the database.


Indicates the user being used to connect to DB doesn't have privilges - access rights

Using mysql clent on server as the MySQL superuser of the DB server

show grants;

show grants for 'ic13557d_chisang'@'localhost';

https://dev.mysql.com/doc/refman/5.5/en/show-grants.html

different databases can have different grants.

'SoS', Ken