You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### 数据库配置, MySQL 和 SQLite3 二选一 .如果同时配置了MySQL 或 SQLite3 ,优先使用 Sqlite3
### The Database configuration,You should choose one between MySQL and SQLite3,if bothMySQL and SQLite3 are configured ,use Sqlite3 first
sqlite3:
enable: true
### mysql数据库配置,请将用户名、密码、ip地址、端口、数据库名称替换为你自己的配置
### mysql database configuration, please replace the user name, password, ip address, port, database name to your own configuration.
mysql:
dsn: username:password@tcp(host:port)/db_name?charset=utf8mb4&parseTime=True&loc=Local&interpolateParams=true
修改后的配置文件
### 数据库配置, MySQL 和 SQLite3 二选一 .如果同时配置了MySQL 或 SQLite3 ,优先使用 Sqlite3
### The Database configuration,You should choose one between MySQL and SQLite3,if bothMySQL and SQLite3 are configured ,use Sqlite3 first
sqlite3:
enable: false
### mysql数据库配置,请将用户名、密码、ip地址、端口、数据库名称替换为你自己的配置
### mysql database configuration, please replace the user name, password, ip address, port, database name to your own configuration.
mysql:
dsn: username:password@tcp(host:port)/db_name?charset=utf8mb4&parseTime=True&loc=Local&interpolateParams=true&tls=true
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
sonic支持SQLite和MySQL,SQLite是保存在本地,迁移不方便,因此选择MySQL数据库,MySQL我不想自己搭建,因此测试了云数据库PlanetScale和TiDB Cloud。
测试
先说结论,云数据库PlanetScale和TiDB Cloud都可以运行sonic,但因为都启用了SSL认证,因此都要修改dns数据库连接。
修改
源配置文件
修改后的配置文件
在
dns
数据库配置中添加&tls=true
,启用证书认证。Beta Was this translation helpful? Give feedback.
All reactions