definitive mysql script