By the way, why do you name them "moviesdb" and "gamesdb"? They are *NOT* DBs. They are only TABLES.
They *could* have been in separate DBs, but clearly they are not, as the code is written.
(To be in separate DBs you would have then had to write
SELECT ... FROM moviesDB.moviesTable ...
SELECT ... FROM gamesDB.gamesTable ...