![Forrest logo](/images/logo.png)
mysql:databases:show
This command will display all MySQL databases in the command-line interface.
$ mysql -e 'SHOW DATABASES'
try on your machine
The command "mysql -e 'SHOW DATABASES'" is used to execute a SQL query in the MySQL command-line tool.
Here is a breakdown of the command:
- "mysql" is the command-line tool used to interact with the MySQL database server.
- "-e" is an option that specifies that a single SQL statement will be executed.
- "'SHOW DATABASES'" is the SQL statement being executed. "SHOW DATABASES" is a MySQL command used to fetch a list of databases present in the MySQL server.
When you run this command, it will open a connection to the MySQL server and execute the "SHOW DATABASES" query, which will return the list of databases in the server's output.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.