how to mysql if database not exists code example Example: python mysql check if database exists CREATE DATABASE IF NOT EXISTS DBName;