Change mysql copy database name logic