[Owl-devel] MySQL parameters

Jose M. Duarte jose.m.duarte at gmail.com
Thu Apr 15 05:52:47 EDT 2010

Hi all

Just a quick note. I've removed a couple of hard-coded MySQL parameters I've
found in the code. This happens every so often, specially for newcomers.

So as a reminder, why we don't want hard-coded MySQL parameters in the code?
first because they contain security related information (servers, passwords
and so on), second because hard-coding is bad! it makes things not portable
and since now we are kind of public we really need to take care of this.

The solution for the MySQL connection is simply to use the constructor with
no parameters:

MySQLConnection conn = new MySQLConnection();

that will read the .my.cnf config file from the user's home directory.
Anyone using mysql should have one of those already properly set up. If
anything change in the connection parameters you only need to edit the
.my.cnf file and all is done.

Hope that helps

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bioinformatics.org/pipermail/owl-devel/attachments/20100415/ba0fa277/attachment.html>

More information about the Owl-devel mailing list