Skip to content

@koishijs/plugin-database-mysql

TIP

需要的最低版本是 MySQL 5.7 / 8.0 或 MariaDB 10.5。

配置项

config.host

  • 类型: string
  • 默认值: 'localhost'

要连接的主机名。

config.port

  • 类型: number
  • 默认值: 3306

要连接的端口号。

config.username

  • 类型: string
  • 默认值: 'root'

要使用的用户名。

config.password

  • 类型: string

要使用的密码。

config.database

  • 类型: string
  • 默认值: 'koishi'

要访问的数据库名称。