on the mysql prompt first check if a database with the same name already exit.
- mysql> SHOW DATABASES;
If your database is not in the provided list then run the following query to create a database:
CREATE DATABASE <DATABASENAME>;
Replace the <DATABASENAME> with your database name.
For example to create a database with the name test:
- mysql> CREATE DATABASE test;
In order to check if your database is created then run the show databases query again.
- Commands do not have to be entered in the upper case.
- All MySQL queries must end with the semicolon ";"
No comments:
Post a Comment