Add function to copy data to mysql.