PHP and mySQL need to be on a server to be executed. Your game is on the client side, so it doesn't matter where it is (published or started from C2 editor).
You can download xampp to host the PHP and mySQL locally on your pc and it'll work without any limitations. (So that no server is needed to have c2 game, php, mysql)