See which MySQL database is currently in use

When you work in the MySQL console and you want to see which database is used, type:

SELECT database();

The result you see is the database you would activate with

USE database_name;
Martin Straub over 9 years ago
This website uses short-lived cookies to improve usability.
Accept or learn more