
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Change Default MySQL Database
Suppose currently we are using a tutorial database so it would be the default MySQL database for subsequent queries. Now, with the help of USE db_name statement, we can change the default database to other given database subsequent queries.
mysql> USE Sample Database changed
The database has been changed to Sample from the tutorial. To verify this we can run the following command −
mysql> select database(); +------------+ | database() | +------------+ | sample | +------------+ 1 row in set (0.00 sec)
Advertisements