Refactor mysql connection
update gitignore