In m file just change line
obj.dbconn = database('name', 'user', 'password');
using your own data.
In main program just do connection = mysql.
Result = connection.execute('statement') executes any mysql statement and obtains data, if any, in variable result.
connection.tableExists('tableName') is true/false based on existence of the tableName in Mysql database.