Flask WEB的mysql数据库未初始化提示Internal Server Error

问题:网页提示Internal Server Error,后台提示"Table 'xtdt.users' doesn't exist"

sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1146, "Table 'xtdt.users' doesn't exist") [SQL: 'SELECT users.id AS users_id, users.username AS users_username, users.comcode AS users_comcode, users.isadmin AS users_isadmin, users.isvalid AS users_isvalid, users.role_id AS users_role_id, users.password_hash AS users_password_hash \nFROM users \nWHERE users.id = %(param_1)s'] [parameters: {'param_1': 1}]

dbvisual中可以看到xtdt库里面没有table

Flask WEB的mysql数据库未初始化提示Internal Server Error_第1张图片

最后发现sqlalchemy建表时名字重复了

你可能感兴趣的:(Flask WEB的mysql数据库未初始化提示Internal Server Error)