Upgrade to mySQL version

The application is upgraded so now it uses mySQL DB.
Changes in the code were made to keep it in line with the requirements.