1

I have a scenario where I need to store the configuration/properties file in MySql and use it further in the project, Does a simple configuration table like below makes sense or any other suggestions to improve this?

I have to put other mysql db configuration in a table, I approached in a simple way as,

creating table named config:

create table config(host varchar(50),
                    user varchar(30),
                    password varchar(30),
                    db varchar(30),
                    charset varchar(20),
                    cursorclass varchar(30) );

and inserting the respective values to config

I thought some fields would be mandatory ,so simply would add a NOTNULL

Is there a better way to manage the same configuration?

KcH
  • 3,302
  • 3
  • 21
  • 46

1 Answers1

1

It would be best if you can encrypt your sensitive information because in the case of hacking of this master table no one can reach to your other databases easily. So my suggestions are to make it a little bit secure and security should be at the pear ( lock + key = open door ) level.

Ref: https://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html#function_aes-encrypt