Press "Enter" to skip to content

MySQL use database

MySQL Use Database

MySQL use database command is use for to Open Database. Lets understand How to run MySQL use database . First of all connect to MySQL than once it is connected with MySQL , It is used to select one database  or in other word it will help to open one database if server has multiple database.

Selecting MySQL Database from the Command Prompt

How to Open database ,it is very simple. Once the command prompt appears then in front of mysql> type use “database name”;

This is an example, will open w3htmlschool at MySQL command

#mysql -u root -p
Enter password: 
mysql> use w3htmlschool;
Database changed
mysql>

Above Command will open database  at command prompt , It is ready for MySQL command like ,create tables ,show tables etc.