I've been searching but I have not found exactly what I'm looking for.
I have two databases, let's call them Base1
and base 2
and a stored procedure that executes in base 1
, this base has a series of mirror tables that look at base 2
. They are copies and redundant information.
base 1
is in say that ip 10.1.1.1
and base two in ip 10.2.2.2
.
What I want is for my stored procedure to do something like this:
BEGIN
DECLARE valor int Default 0;
Select count(*) into valor
From base2.tabla
Insert into base1.tabla
values(valor)
END
To give an example.
In this link puts something like this
I wonder if I could do something kind
FROM ip:3306.base2.tabla
Something that would allow me to get data of base 1
and put them in base 2
to eliminate that redundancy of data.