I am currently working on a personal project where I have multiple Android applications communicating with a server. This server was created with Python's Flask framework and utilizes a MySQL local server.
For more of a production like setup in the near future, what is the best practice for configuring the MySQL credentials such as user, pass, database, host. Currently, I have my database_connector.py file pointing to a file with these secrets.cfg. Should values in mysql.cfg be encrypted in some way? Anything else I should know about this?
This is the line of code in database_connector.py that tells my database where it's credentials are:
connection = mysql.connector.connect(option_files='mysql.cfg')
For more of a production like setup in the near future, what is the best practice for configuring the MySQL credentials such as user, pass, database, host. Currently, I have my database_connector.py file pointing to a file with these secrets.cfg. Should values in mysql.cfg be encrypted in some way? Anything else I should know about this?
This is the line of code in database_connector.py that tells my database where it's credentials are:
connection = mysql.connector.connect(option_files='mysql.cfg')