Updated MySQL syntax in line with current MySQL 5+ conventions

Fixes issues with this script failing