Appearance
MySQL Tables
Menu: Database → MySQL Tables
Deep link:/_Admin/database/mysql-table?SiteId={siteGuid}
MySQL tables let you browse and manage tables in an connected external MySQL database from the admin: create tables, maintain columns and data, and import / export CSV. Configure the Mysql connection string under Service integrations first; scripts use k.DB.mysql for SQL or table objects. Child routes must include dbType=MySql; the left menu highlights MySQL Tables.
Permissions
Same as SQLite tables: database (view), database·edit, database·delete.
Configuring the connection string requires Service integrations config·edit.
Difference from SQLite tables
| MySQL tables | SQLite tables | |
|---|---|---|
| Data source | External MySQL (connection string) | Site built-in SQLite file |
| Prerequisite | Service integrations Database → Mysql | No configuration |
| When not configured | Guided page + Configure now | Lists tables directly |
| Column / data UI | Same as SQLite (no primary key/unique columns; has CSV) | Same |
| Script | k.DB.mysql | k.DB.sqlite |
| SQL log type | mysql | sqlite |
Column editing and data browsing share views/database/table/* routes with IndexedDB / SQLite.
Configure MySQL connection
- Open Site settings → Service integrations:
/_Admin/system/config?SiteId={siteGuid} - Expand the Database group and edit Mysql. See Service integrations · Database.
- Enter the connection string (ConnectionString) and save.
Example format (follow Kooboo built-in guidance):
text
Server=myServerAddress;Port=3306;Database=myDataBase;Uid=myUsername;Pwd=myPassword;You can also click Configure now on the MySQL Tables unconfigured guide page to jump to /_Admin/system/config?SiteId={siteGuid}&group=Database (Database group expanded automatically).
Security
Connection strings contain credentials; do not commit them to public repositories. Use least-privilege database users in production.
How to Open
- In Edit Menu, check Database → MySQL Tables.
- Complete Configure MySQL connection.
- Open Database → MySQL Tables in the left sidebar.
When not configured or the connection is invalid, the page shows an error and Configure now; no table list is shown.

After a successful connection, list, columns, data, CSV import, and other UIs share the same pages as SQLite tables (only dbType=MySql and menu highlight differ). Screenshots below use SQLite as an example; MySQL looks the same once configured.
Table List
| Action | Permission | Description |
|---|---|---|
| Create table | database·edit | Create table in MySQL and register admin schema |
| Click Name | database | Open table data |
| Settings (gear) | database | Open column settings |
| Multi-select Delete | database·delete | Delete selected physical tables (use with care) |
Table name rules match IndexedDB / SQLite: 1–50 characters, letter or digit start, letters and digits only.



Create table dialog

Column Settings
Route example:
text
/_Admin/database/table/columns?SiteId={siteGuid}&table={tableName}&dbType=MySqlSame as SQLite column settings: list shows column name, control type, index (no primary key/unique columns); column editor has no length, auto-increment, or primary key/unique (IndexedDB only). Save updates MySQL table structure and admin control mapping.


Table Data
Route example:
text
/_Admin/database/table/data?SiteId={siteGuid}&table={tableName}&dbType=MySqlToolbar
| Button | Permission | Description |
|---|---|---|
| New data | database·edit | Open edit page |
| Export data | database | Export CSV |
| Import data | database·edit | CSV import |
| Settings | — | Jump to column settings |


CSV import
Fields and flow match SQLite CSV import: skip rows, upload .csv, field mapping (required/unique), optional overwrite.

Edit Data
Route example:
text
/_Admin/database/table/edit-data?SiteId={siteGuid}&table={tableName}&dbType=MySqlForm rendered by column control type; Save / Cancel returns to the data list.
Script access (development)
typescript
const rows = k.DB.mysql.query(
"SELECT * FROM orders WHERE id = @id",
{ id: 1 }
)
k.DB.mysql.execute(
"INSERT INTO orders (order_no, amount) VALUES (@no, @amt)",
{ no: "A1001", amt: 99 }
)
const table = k.DB.mysql.getTable("orders")When Default database under Site settings → Advanced is set to Mysql, k.DB.sql and k.DB.mysql point to the same instance.
See k.DB (mysql and sqlite share relational APIs: query / execute / getTable, etc.).
SQL logs
With site SQL logging enabled, statements from k.DB.mysql can be filtered by type MySQL in SQL logs.
Typical workflow
- Configure Mysql under Service integrations and verify connectivity.
- Open MySQL Tables, Create table or sync existing database tables (tables already in the database appear in the list).
- Settings for columns and control types; New data or Import CSV.
- Read/write in Code with
k.DB.mysql; check SQL logs when troubleshooting.
Related
| Doc | Description |
|---|---|
| SQLite tables | Built-in database; no connection |
| SQL Server tables | Similar external database |
| k.DB | Script API |
| SQL logs | Execution records |
| Database overview | Menu overview |