The database can be create in two ways in which we are accessing the mysqlGUI tool as defined in the installation page. they are
- Create Database by Command through query browser
- Create Database by UI
Create Database by Command through query browser
In this first we need to open the the MySQL administrator window as we have define in the installation page, then click on the "catalogs" on the left lower index in the opened window, a new window is appear on the just below to the left side of the same page or same window page, whose image is given below
Click on the "Window" tab on the menu bar and select "MySQL Query Browser", whose image is given below
A new window is open , whose image is given
In the above image the Query text area is the box in which we have to write the query and execute it
Before creating a new database we need to know wheather the same name database is already is present in our database or not, so for this sake we can run a simple query in query browser and execute them, the command are:
For execution of the command we need to select then and then press Execute tab (present on right side of query text box) or press "ctrl+enter" and we got the required result, its image is given below
Now we know the proposed name we require to create the databse is not then the write the command in the query text box.
Syntax for Create database
CREATE DATABASE DATABASENAME
CREATE DATABASE college
a simple message is shown that "1 row affected by the last command". To view our new database again run the Show databases command and check the result, the database name is shown in reslut block and also in the "Schemata" in the right side of the window, like image is given below.
Create Database by GUI
Open the MySQL administrator window as define above, and click on the catalogs, a new "Schemata" is open in the lower side of the left pannel. The yellow color coins are the database icons and their name is shown in front of then, then right click any of them a new list is appear in which select "Create New Schema", whose image is given below
A new popup window is appear and rite the name into the text box of new schema and then press enter, whose image is given below.
Check the newly create database into the list of "Schemata" block