1. Home
  2. MySQL Tutorials
  3. MySQL Select Database

MySQL Select Database

In this tutorial, We are going to cover,  Select Database in MySQL using command line.

First login to MySQL using with UserName and password.

$ mysql -u username -p

To specify the database to use in MySQL, The USE DATABASE statement is applicable in cases where several databases exist in a MySQL server.

Syntax:

USE database_name;

Example:

In this example, let’s name the database “movies”.

mysql> USE movies;

Output:

mysql> use movies;

Database changed

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.