Home > other >  (3090, turn Warning: "Changing SQL mode 'NO_AUTO_CREATE_USER'
(3090, turn Warning: "Changing SQL mode 'NO_AUTO_CREATE_USER'

Time:10-09

Run the code in the pacharm CharField field max_length=20, null=True implementation, feeling is to run the code to create table doesn't change, and recompense errors, for help, how to eliminate this warning
Python3.7 version, mysql5.7 version

Run the code:
The from peewee import *

The db=MySQLDatabase (" spiders ", the host="127.0.0.1", user="root", "=" root ")

The class Person (the Model) :
Name=CharField (max_length=20, null=True)
# name=CharField ()
Birthday=DateField ()

The class Meta:
The database=db # This model USES the "is people. The db" database.
Table_name="users"


If __name__=="__main__" :
Db. Create_tables ([Person])

Error:
C: \ Users \ dolaemon_li \ PycharmProjects \ spiders \ venv \ lib \ site - packages \ pymysql \ your cursors py: 170: Warning: (3090, "Changing SQL mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.")
Result=self. _query (query)

CodePudding user response:

Update pymsql under a try,
  • Related