Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To verify the existence of a MySQL database, you can use the following method:

  1. Open the command line interface or terminal.

  2. Type the following command: mysql -u username -p

  3. Enter the MySQL user password when prompted.

  4. After logging in to MySQL, type the following command: show databases;

  5. This command will display a list of all the databases in the MySQL server.

  6. Search for the name of the database you want to verify in the list.

If the database exists, its name will appear in the output. If it does not exist, it will not appear in the list.