Hello, Juziinfo!

m0o0mbao

导航

flask--数据库连接--URL

使用URL制定数据库

数据库引擎URL
MySQL mysql://username:password@hostname/database
Postgres postgresql://username:password@hostname/database
SQLite(Unix) sqlite:////absolute/path/to/database
SQLite(Windows) sqlite:///c:/absolute/path/to/database

SQLite 数 据 库 不 需 要 使 用 服 务 器, 因 此 不 用 指 定 hostname 、 username 和 password 。URL 中的 database 是硬盘上文件的文件名。

posted on 2017-12-24 10:52  m0o0mbao  阅读(508)  评论(0编辑  收藏  举报