Relate 2 databases [closed]

-1

I hope you can help me:

I have 2 databases and I need to link a data from BD1 to BD2 .

I am currently working with mysql workbench , will it be possible to do the relationship from one BD to another?

    
asked by Edwin Ricardo Reyes Martinez 06.05.2017 в 08:48
source

2 answers

1

You can involve more than one database in the same query, you just have to rate it example

SELECT 
    base1.*, base2.*
FROM 
    nombreBase1.nombreTabla base1
INNER JOIN 
    nombreBase2.nombreTabla base2 
    ON base1.id=base2.id
    
answered by 06.05.2017 в 10:47
-1

As I see it, the simplest thing would be to create a view in BD2 with the data from BD1. Then you create the relationship from the view to the table on your BD2.

Greetings.

    
answered by 06.05.2017 в 10:30