Moving the mysql commands to later in the script