[LON-CAPA-admin] loncapa with remote mysql server?
raeburn at msu.edu
Fri Oct 18 12:10:17 EDT 2019
I found eight instances of DBI->connect() in the LON-CAPA code, in the following files:
/home/httpd/perl/lonsql (2 instances)
/home/httpd/lib/perl/Apache/lonmysql.pm (2 instances)
I have not tried using a remote mysql server, but it seems you should be able to replace
(where $dbname is database name, $hostname is remote host, and $port is remote port)
in each of those eight instances, and then configure permissions and users appropriately in the mysql instance on the remote server.
The LON-CAPA script (install.pl) used to prepare a server/VM for LON-CAPA installation, which is contained in the tar file: http://install.loncapa.org/versions/linux/install.tar
is used to set up the user and permissions for a MySQL database running on the local server. Inspection of the part of that perl script that sets up MySQL could assist in setting up the remote mysql server (with a modification to allow connections from the remote LON-CAPA node).
LON-CAPA Academic Consortium
From: LON-CAPA-admin <lon-capa-admin-bounces at mail.lon-capa.org> on behalf of Todd Pfaff <pfaff at rhpcs.mcmaster.ca>
Sent: Wednesday, October 2, 2019 12:02 PM
To: lon-capa-admin at mail.lon-capa.org
Subject: [LON-CAPA-admin] loncapa with remote mysql server?
Anyone using loncapa with a remote mysql server instead of localhost?
If yes, do you have a list of loncapa code diffs to implement the
changes? I found at least five spots in loncapa perl code where the
perl DBI->connect string would need to be changed and I'm wondering if
there are other loncapa code changes that would be required.
LON-CAPA-admin mailing list
LON-CAPA-admin at mail.lon-capa.org
More information about the LON-CAPA-admin