A
A
Alj2018-03-27 03:57:53
MySQL
Alj, 2018-03-27 03:57:53

How to make a synonym for tables in another database?

There is a relatively large set of tables (>60Gb) that is used in many projects (5 and more). Updating \ changing the data in them is not expected by projects, from their point of view - it is only for select. I would like to avoid duplication and move it to a separate database without rewriting queries, specifying its tables in the form otherDB.big_table.column, and leaving big_table.column as it is. Is it possible to make some kind of symlink table inside the project and indicate that the data is in another database within the same MySQL server? And the second question, what if a large database is generally on another MySQL server?
ps If it is important, then queries to a large dataset only SELECT big_table or LEFT JOIN big_table ON big_table.indexed_field = ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2018-03-27
@Alj

Within one DBMS server - make view. If the user has rights, he can access other databases of the same host.
To another server - as far as I know, it's impossible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question