It looks like the MySQLdb cursor is emitting the warning, and AFAIK
there is no way to prevent MySQLdb from generating warnings. You can
tell Python to suppress this specific warning via:
import MySQLdb
import warnings
warnings.filterwarnings(
action="ignore",
category=MySQLdb.Warning,
message="Can't create database 'TEST'; database exists")
or suppress all MySQLdb warnings via:
import MySQLdb
import warnings
warnings.filterwarnings(
action="ignore",
category=MySQLdb.Warning)
-Conor