updated mysql script