在用配置类的方式给app设置配置时, SQLALCHEMY_ECHO 这个是记录打印SQL语句用于调试的, 一般设置为False, 不然会在控制台输出一大堆的东西
/home/python/.virtualenvs/py3_flask/bin/python /home/python/Desktop/test/demo_sqlalchemy.py
2018-12-27 17:46:54,205 INFO sqlalchemy.engine.base.Engine SHOW VARIABLES LIKE 'sql_mode'
2018-12-27 17:46:54,205 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,208 INFO sqlalchemy.engine.base.Engine SHOW VARIABLES LIKE 'lower_case_table_names'
2018-12-27 17:46:54,208 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,211 INFO sqlalchemy.engine.base.Engine SELECT DATABASE()
2018-12-27 17:46:54,211 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,212 INFO sqlalchemy.engine.base.Engine show collation where `Charset` = 'utf8mb4' and `Collation` = 'utf8mb4_bin'
2018-12-27 17:46:54,212 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,214 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS CHAR(60)) AS anon_1
2018-12-27 17:46:54,214 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,215 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS CHAR(60)) AS anon_1
2018-12-27 17:46:54,215 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,216 INFO sqlalchemy.engine.base.Engine SELECT CAST('test collated returns' AS CHAR CHARACTER SET utf8mb4) COLLATE utf8mb4_bin AS anon_1
2018-12-27 17:46:54,216 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,217 INFO sqlalchemy.engine.base.Engine DESCRIBE `user`
2018-12-27 17:46:54,217 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,218 INFO sqlalchemy.engine.base.Engine DESCRIBE `role`
2018-12-27 17:46:54,218 INFO sqlalchemy.engine.base.Engine {}
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
2018-12-27 17:46:54,661 INFO sqlalchemy.engine.base.Engine SHOW VARIABLES LIKE 'sql_mode'
2018-12-27 17:46:54,661 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,663 INFO sqlalchemy.engine.base.Engine SHOW VARIABLES LIKE 'lower_case_table_names'
2018-12-27 17:46:54,663 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,667 INFO sqlalchemy.engine.base.Engine SELECT DATABASE()
2018-12-27 17:46:54,667 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,668 INFO sqlalchemy.engine.base.Engine show collation where `Charset` = 'utf8mb4' and `Collation` = 'utf8mb4_bin'
2018-12-27 17:46:54,668 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,670 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS CHAR(60)) AS anon_1
2018-12-27 17:46:54,670 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,670 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS CHAR(60)) AS anon_1
2018-12-27 17:46:54,671 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,671 INFO sqlalchemy.engine.base.Engine SELECT CAST('test collated returns' AS CHAR CHARACTER SET utf8mb4) COLLATE utf8mb4_bin AS anon_1
2018-12-27 17:46:54,671 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,672 INFO sqlalchemy.engine.base.Engine DESCRIBE `user`
2018-12-27 17:46:54,672 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,674 INFO sqlalchemy.engine.base.Engine DESCRIBE `role`
2018-12-27 17:46:54,674 INFO sqlalchemy.engine.base.Engine {}
* Debugger is active!
* Debugger PIN: 983-796-441