![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Is it necessary to select the database each time we begin a MySQL session?\nHow can it be done?
The database is created only once but it is necessary to select it each time we begin a MySQL
session. It can be done with the help of USE db_name statement on MySQL command line tool.
mysql> Use Query; Database changed
It shows that we are now using query database.
We can also select the database while invoking the MySQL from Windows command line. It can be done with the help of the following command −
C:\Program Files\MySQL\bin>mysql -u root -p query Enter password: *****
Here, query is the name of the database we are going to use for current MySQL session
Advertisements