Cross-Database Access in TiDB

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb 跨库访问

| username: ljh_wxy

【TiDB Usage Environment】TiDB feature research environment
【TiDB Version】V5.4.1
【Encountered Problem】Does TiDB support Oracle’s dblink functionality?
【Reproduction Path】None
【Problem Phenomenon and Impact】
None
【Attachment】None

| username: BraveChen | Original post link

Not supported

| username: ljh_wxy | Original post link

Okay, thank you, expert.

| username: Kongdom | Original post link

I saw on Baidu that MySQL supports FEDERATED for cross-database operations. Does TiDB support this?

| username: ddhe9527 | Original post link

In the SHOW ENGINES output, there is only InnoDB, and it does not support FEDERATED, right?

| username: db_user | Original post link

Not supported, innodb is also a compatible term, not the actual innodb. You can use a compromise method, using DM or CDC to perform real-time synchronization of the required data tables to achieve cross-database operations.

| username: BraveChen | Original post link

Indeed, this is a remote table on MySQL. I have used it, but TiDB does not have this feature yet.

| username: ShawnYan | Original post link

What if I use ODBC to connect?

| username: HACK | Original post link

Check if this helps:

| username: Kongdom | Original post link

:wink: In that case, I have a request that I’m not sure if I should mention~ Hehehe

| username: BraveChen | Original post link

What are the requirements?

| username: BraveChen | Original post link

Please go ahead, expert.

| username: Kongdom | Original post link

:wink: The requirement is to implement that MySQL feature, after all, it needs to be compatible with MySQL.

| username: maokl | Original post link

It might be a bit challenging.

| username: BraveChen | Original post link

My thought is that things like stored procedures and custom functions were definitely known and considered in the early stages, and after discussion, it was decided not to implement them. The possibility of adding them later is very small. Additionally, remote tables in MySQL are actually used very rarely within MySQL itself. I think the possibility is even smaller.

| username: Z六月星星 | Original post link

It should not be supported.

| username: ablewang_xiaobo | Original post link

Does TiDB support FEDERATED?

| username: tidb狂热爱好者 | Original post link

It is estimated that data interaction with TiDB can only be achieved through PostgreSQL. PostgreSQL has FDW plugins and dblink.

| username: alfred | Original post link

Cross-database access is not supported, but it can be converted through other means.

| username: system | Original post link

This topic was automatically closed 1 minute after the last reply. No new replies are allowed.