- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can we change the default MySQL database to the given database?
152 Lectures 16 hours
87 Lectures 5.5 hours
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)
- How can we check the default character sets of a particular MySQL database?
- How can we drop a MySQL view from the database?
- How can we delete a MySQL stored function from the database?
- How to get the list of tables in default MySQL database?
- How can we write PHP script to get the list of MySQL database?
- How can we create our own choice MySQL database?
- How can I set a MySQL database to use MyISAM by default?
- How can we create user accounts in MySQL database server?
- How to alter the database engine of a MySQL database table?
- Get the date/time of the last change to a MySQL database?
- While connecting to one MySQL database, how can I see the list of tables of other MySQL database?
- How can we create a table from an existing MySQL table in the database?
- How can we see the list of views stored in a particular MySQL database?
- How can we change the default font of the JTabbedPane tabs in Java?
- What do you mean by default MySQL database for the user?