Installation

WebWork DBI ODBC to remote database

WebWork DBI ODBC to remote database

by Rodrique Heron -
Number of replies: 3
How can setup setup WebWork to work with a remote database. Since its using the perl DBI module, can I just install the mysql odbc driver and configure database.conf ?

Thanks
In reply to Rodrique Heron

Re: WebWork DBI ODBC to remote database

by Gavin LaRose -
Hi Rodrique,

I haven't tried this, but it seems to me that it should work to set $database_dsn in the global.conf file to dbi:mysql:database=webwork:host=hostname, or whatever the appropriate string is. If you have it available, then I'd be tempted to try and if it doesn't work post a follow-up so that we can figure out why it doesn't.

Mike or Sam would be a better source for an answer to this, however.

Gavin
In reply to Rodrique Heron

Re: WebWork DBI ODBC to remote database

by Sam Hathaway -
As Gavin points out, you can do this with DBD::mysql (which is the only driver that WeBWorK supports at the moment). There's no need to resort to ODBC. The complete syntax for DSNs is documented in the connect method of DBD::mysql. The complete syntax is supported by WeBWorK's $database_dsn. For example:

$database_dsn = "dbi:mysql:database=webwork;host=db.math.yourschool.edu";

Hope this helps!
-sam
In reply to Sam Hathaway

Re: WebWork DBI ODBC to remote database

by Rodrique Heron -
Thanks Gavin and Sam, I'm in the planning phase right now and will post my results as soon as I get my test server up and running.

Thanks