Send Yun sensor data to MySQL on external server

Start writing a PHP script that you can invoke from the command line and that can connect and insert data into your mysql database. This is a pure PHP question, so this forum is not the best place for finding answers.
Once you have it, get back here if you need support in using Process for calling your script from the yun