Fixing mysql script automation