List databases on MySQL server
Question:
How to list databases on MySQL server? Answer:
SHOW DATABASES;
Description:
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.
Reference:
SHOW DATABASES reference
Share "How to list databases on MySQL server?"
Related snippets:
Tags:
list databases, show databases, show schemas, database, schema, list, mysql Technical term:
List databases on MySQL server