designing the python gui database we used the shortest way to connect to mysql server by hardcoding the credentials required for authentication into the connection method while this is fast approach for early developmentwe definitely do not want to expose our mysql server credentials to anybody unless we grant permission to databasestablesviewsand related database commands to specific users much safer way to get authenticated by mysql server is by storing the credentials in configuration filewhich is what we will do in this recipe we will use our configuration file to connect to the mysql server and then create our own database on the mysql server firstwe create dictionary in the same module of thme ysql py code create dictionary to hold connection info dbconfig 'user'use your admin name 'password'use your admin password 'host' 'ip address of localhost nextin the connection methodwe unpack the dictionary values instead of writinga mysql connect('user''password''host' ' we use(**dbconfigwhich does the same as above but is much shorter import mysql connector as mysql unpack dictionary credentials conn mysql connect(