To start with this tutorial, we assume you are logged in to the Database server as the root user. Thus, you have the privilege to create and drop databases.
First, you can check the databases you have in your system by executing the query show databases as shown below.
To create a new database, you can use create database <db_name> command as shown in the following figure. In the following figure, the name of the database is mysql_test_db, which should be replaced by your database name.
Similarly, you can drop a database by using drop database <db_name> command as shown below. In the following figure, the database test is dropped.
As we have created a database, mysql_test_bd, we can use this database to store tables and we can use it as a persistent store. To use a database, you have to use use db_name command as shown below:
At this moment the database does not have any table. In the next tutorial, we will discuss how to create tables in this database?
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.