I'm making a python program which I would like to distribute. I would also like to have a MySQL database which would store usernames and hashed and salted passwords for each person that registers.
How would I go about connecting to the database without anyone being able to open the source code and look at the credentials to connect to the database?
If you are using git, you can store the credentials in a json file, using json python packpage and put the file name in .gitignore. So, whoever clones your repository will need to create the json file for the script to work, you can also create a README.md explaining how to do it
Is there a good way to connect to a database without exposing credentials in Python?