title: How can i store MySQL database password and username to access the database?
body: <p>I am working on a project which have to access the MySQL database username and password to read and update the user database.</p>
  
  <p>Initially i wrote the username and password of the database directly to my code.
  But my teacher asked me to create a prompt box which will take the username and password on 1st run of the program and not again.
  So if do that i will not be able to access the database next time.</p>
  
  <p>I was thinking to store that username and password into a local text file.</p>
  
  <p>Is it good idea.
  Or there are any good methods to do this type of work?</p>