Okay, so lets look at what you are doing here.
In the main, you issue a game.start() which creates a new thread of this and issues a start command on the thread. The main thread is now returned to the main as the game thread issues a run.
In this run, it's job is to loop while !running, but perform no actions. Since the game is running, this immediately stops this thread's run. This thread is now terminated. Complete control is now just the main thread, which is sitting idle on the main. The application is complete awaiting input for the gui.
So if you are looking to make this do something, you'll need to write what it needs to do in the run method. You'll also likely need to write the entire paint method for the canvas.
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php