Back

Explore Courses Blog Tutorials Interview Questions
0 votes
4 views
in SQL by (55.6k points)

Can anyone explain what is the default database in MySQL?

1 Answer

0 votes
by (119k points)

You can use the SHOW DATABASES statement lists all databases in the MySQL database server before you create a new database.

Here is the syntax to list all the databases in the server:

SHOW DATABASES;

You can observe the databases in the MySQL database server. The information_schema and MySQL are the default database in MySQL.

Selecting a database to work with

If you want to use a particular database you want to work with, you can do using the USE statement as below.

USE database_name;

If you want to learn MySQL from top professionals, then check out this SQL Certification program by Intellipaat.

Also, watch this video on MySQL:

Related questions

0 votes
1 answer
asked Jun 26, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer
0 votes
1 answer
asked Feb 7, 2021 in SQL by dev_sk2311 (45k points)

Browse Categories

...