-
-
Save samuelloza/7c8c3aebb10a9b3e3fb24560f72f7329 to your computer and use it in GitHub Desktop.
Mysql FEDERATED
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mysql FEDERATED es un link de una tabla a otra tabla remota, | |
| no es bueno usar si se tienen muchos datos. | |
| Si son pocos pues aquí la solución a menos que quieras construir un script de sincronización y ponerlo en un crontab | |
| -- Tabla con conexion a una base de datos remota | |
| CREATE TABLE tabla_remota | |
| ( | |
| id INT NOT NULL AUTO_INCREMENT, | |
| campo1 VARCHAR(32), | |
| campo2 INT, | |
| PRIMARY KEY (id), | |
| INDEX campo1 (campo1) | |
| ) | |
| ENGINE=FEDERATED | |
| DEFAULT CHARSET=utf8 | |
| CONNECTION='mysql://usuario:contraseñ[email protected]/base_datos/tabla'; | |
| http://www.latindevelopers.com/ivancp/2011/11/activar-federated-mysql/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment