MySQL Database Operation
In this tutorial, you will know how to create database and get list of databases.
Get list of all databases of the server
To get list of all databases of the server where mysql is currently running, run the SHOW command as shown below.
SHOW Databases does not display those databases that has no priviledge to show.
If your administrator provide you priviledge to create database, then you can create it yourself. To create a new database run the given command-
mysql->CREATE Database school;
If you are working under UNIX, database names are case sentitive.
To select a database for use or to perform operations, run the USE command, as shown below.
This command does not require semicolon.
Delete a database
DROP command is used to drop a database. Suppose you want to delete a database named company. Run the following command -
mysql>DROP DATABASE company;