mysql5.7
python3.7
在pycharm中执行如下代码报错,在navicat中查看Person表也没有生成,请大家帮忙看看
执行代码如下:
from peeweeimport *
db = MySQLDatabase("spider",host="127.0.0.1",user="root",password="root")
class Person(Model):
#name = CharField(max_length=20,null=True)
name = CharField()
birthday = DateField()
class Meta:
database = db# This model uses the "people.db" database.
table_name="users"
if __name__=="__main__":
db.create_tables([Person])
报错如下:C:\Users\dolaemon_li\PycharmProjects\spider\venv\lib\site-packages\pymysql\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)