I have a MySQL script that I want to use only if the database doesn't exist to inject some initial demo data for development. If it does exist I just want to break out of the script. The script starts like
CREATE DATABASE IF NOT EXISTS `demo-database`;
USE `demo-database`;
Is there a way to exit here or above the create database if the database exists so that it wont run through all the table setups and inserts?