Andre-Littoz - 2015-01-03

Sure, that would be a nice feature though it means a negative impact on performance (round-trip delay to/from server).

I think it is already (manually) possible. The trick is the DB designation in parameter 'dbname' (lxr.conf file). I haven't checked but Perl DBI should be able to handle the case.

Configuration file lxr.conf

From a quick googling, the 'dbname' parameter should be modified as:

'dbname' => 'dbi:mysql:dbname=<db>;host=<host>;port=<port>'

where
<db> is the database name (no change compared to present automatic configuration, e.g. lxr_project_db
<host> is the IP or hostname, e.g. //127.0.0.1 or //db.server.example.com
<port> is the port number (can probably be omitted if there some "standard" value)

Presently, this change must be done manually because the configuration template tolerates only a-z 0-9 and _ in the database name and will object if characters like / . ; or = are detected in the name. This is a one line change; it is not too hard a task.

Database creation

Script initdb.sh has to be adapted to reference the remote host. This involves adapting command line mysql (3 times because there are 3 invocations).

In the first command which creates database user, user designation ('lxr'@'localhost') must be modified to match the DB server.

You then launch the script in a way it effectively creates the DB and the tables on the remote server. Perhaps, the simplest way is to upload the script in a remote shell and execute it locally on the remote (in which case it might be unnecessary to modify the script). Check the outcome with phpMySQL.

Creating the cross-references

Since genxref uses Perl DBI and lxr.conf and shares a lot of code with the LXR display scripts, it should work without modification

Experimenting

If you have time and a use case, could you experiment and give me feed back?

If it works fine, I'll then add a "Tip" page to the LXR site. Eventually, your suggestion could lead to a new version of the configurator.

Of course, if you meet difficulties, I can help you to solve them.

Bottom line note

It is likely than the source-tree can also be located on a remote server, provided if it is hosted in a version control system which designation accepts a server name.