how to check if a database exists in mysql using java and if not then create one code example Example: python mysql check if database exists CREATE DATABASE IF NOT EXISTS DBName;