SHOW DATABASES lists the databases on the MySQL server host. You see only those databases for which you have some kind of privilege unless you have the global
SHOW DATABASES privilege.
MySQL implements databases as directories in the data directory, so this statement simply lists directories in that location. However, the output may include names of directories that do not correspond to actual databases.