MySQL “CREATE TABLE IF NOT EXISTS” -> Error 1050

后端 未结 9 1503
温柔的废话
温柔的废话 2021-02-01 00:16

Using the command:

CREATE TABLE IF NOT EXISTS `test`.`t1` (
    `col` VARCHAR(16) NOT NULL
) ENGINE=MEMORY;

Running this twice in the MySQL Que

9条回答
  •  时光取名叫无心
    2021-02-01 01:03

    Create mysql connection with following parameter. "'raise_on_warnings': False". It will ignore the warning. e.g.

    config = {'user': 'user','password': 'passwd','host': 'localhost','database': 'db',   'raise_on_warnings': False,}
    cnx = mysql.connector.connect(**config)
    

提交回复
热议问题