TIP
This guide walks you through bringing an enterprise database into Lovrabet and completing the first database analysis. Afterwards, you can review the tables, fields, and relationships Lovrabet identified in Business Data Model and Dataset Overview.
WARNING
The database address must be reachable from the Lovrabet platform. If the database is on a private network, open public access, configure an allowlist, or connect it through your corporate network setup first.
Before you start
Have the following ready:
| Item | Details |
|---|---|
| App access | You need access to the target app's RabetBase management pages |
| Database address | A publicly reachable host:port, e.g. db.example.com:3306 |
| Database type | MySQL or PostgreSQL |
| Database name | The database or schema name to connect |
| Credentials | A dedicated read-only or controlled account is recommended |
| Network allowlist | The database already permits access from the Lovrabet platform |
Choose how to work
<grid> <column width-ratio="0.500000">
TIP
Option 1: Work in the workbench
Best for first-time connections. You see the connection status, analysis progress, and results pages directly.
</column> <column width-ratio="0.500000">
TIP
Option 2: Let an Agent do it
Best for development and delivery scenarios where the rabetbase CLI and Skill are installed.
</column> </grid>
Option 1: Work in the workbench
Step 1. Open Database Connection Management
Open the target app, then go to:
RabetBase → Database Connection Management
Click Connect new database.
Step 2. Fill in the connection details
Fill in the database type, address, database name, username, and password on the form.
When you're done, click Test connection.
| Test result | Next step |
|---|---|
| Test succeeded | Save the connection |
| Test failed | Check the public address, port, allowlist, credentials, and database permissions |
Step 3. Start a full analysis
After saving the connection, click Full analysis on the connector card.
Wait for the analysis status to become Success or Partial success. Analysis time depends on the number of tables and the complexity of their fields.
Step 4. Review the analysis results
When the analysis completes, open:
- Business Data Model: review the table relationships and the ER structure.
- Dataset Overview: review the generated datasets, fields, and default operations.
If field names, table relationships, or business meanings look inaccurate, calibrate them later in the dataset details.
Option 2: Let an Agent do it in Claude Code
If you have the rabetbase CLI and the matching Skill installed, you can hand the onboarding task to Claude Code. The Agent breaks the task down and calls the CLI.
Copy the prompt below and replace the placeholders with your own values:
请用 rabetbase 帮我把一个数据库接入 Lovrabet,并完成第一次数据库分析。
应用 App Code:<APP_CODE>
数据库类型:<MYSQL 或 POSTGRESQL>
数据库地址:<host:port>
数据库名:<数据库名或 schema>
用户名:<数据库用户名>
密码:<不要在文档中写真实密码,可让我通过安全方式提供>
要求:
1. 先检查当前应用配置和登录状态
2. 创建连接前先预览将要提交的信息,不要在回复里展示真实密码
3. 连接创建后测试连通性
4. 发起全量分析,并查询分析状态直到成功、部分成功或失败
5. 最后告诉我 dbLinkId、分析状态、ER 图入口,以及下一步应该检查什么The Agent normally completes these actions:
| Action | Result |
|---|---|
| Check the app | Confirms the App Code from the current directory or the prompt |
| Create the connection | Writes the database connection configuration |
| Test the connection | Confirms the platform can reach the database |
| Start the analysis | Runs the first full analysis of the table structures |
| Query the status | Reports success, partial success, or the failure reason |
Check the results
[ ] The database connector status is Connected.
[ ] The first analysis status is Success or Partial success.
[ ] Table relationships are visible in Business Data Model.
[ ] Generated datasets are visible in Dataset Overview.
[ ] Open at least one dataset's details and confirm the field names and types are basically correct.
Next steps
| What you want to do | Read next |
|---|---|
| Results are inaccurate; fields and relations need calibration | Understand reverse-engineering results and the business model |
| Table structures changed later and need syncing | Incremental analysis after schema changes |
| Let an Agent answer questions from your data | Help AI understand your data |
| Generate pages, APIs, or functions from datasets | From data to capabilities |
FAQ
Why does the connection test fail?
Check these first:
- Is the database address publicly reachable?
- Is the port open?
- Does the database allow access from the Lovrabet platform?
- Are the username, password, and database name correct?
- Does the database account have permission to read the table structures?
The analysis is partially successful — can I continue?
Check Business Data Model and Dataset Overview first. If the core tables were identified, you can continue with calibration; if key tables failed, look at the failure reasons and run the analysis again.
What if my tables change later?
For a small number of changed tables, you don't need to rerun the full analysis. Use Incremental analysis to sync just the changed tables.
Can I connect a database on a private network?
The prerequisite is that the Lovrabet platform can reach the database address. A private-network database needs network access opened up or a public address before you can connect it.