Changed the mysql to global for the classes to use it all the time