https://dev.mysql.com/doc/refman/5.7/en/symbolic-links-to-databases.html says
MySQL does not support linking one directory to multiple databases.
You can use symbolic links to link a database directory to some other location, for example outside the datadir.
$ cd /var/lib/mysql
$ ln -s /other/dir/mydatabase .
But you can't use symbolic links to make one database directory an "alias" for another MySQL database:
$ cd /var/lib/mysql
$ ln -s `pwd`/mydatabase1 mydatabase2 # WRONG
The reason is that InnoDB retains database names and other metadata inside its own data dictionary, stored in the tablespace file. If you confuse it, you won't get what you want.
MySQL doesn't have any DDL syntax for aliasing a database.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…