I'm working on a desktop application which has a login system. It's written in C++. When it's started, asks for a username and a password then connects to the MySQL database and verifies the entered data. Currently the server's password is hardcoded to application's executable. I know that this is a bad practice, so I would ask your opinion about solving this issue. I should store the server's password encrypted then decrypt every time when a database connection is required, or there is a clever way to do it?
Clarification:
I have a MySQL database with user "root" and password "root". I create a connection to database with that username and password. But when the user wants to log in he enters his username and password which has nothing to do with the root username of the database. That username and password is stored in a table created by me.