How to Create a Database in MySQL
In creating a database on MySQL, all commands must be entered through prompts. A visual interface is absent and this is why it is necessary for you to have a basic idea about how to create a database on it and manipulate it. To start with, to create a database, you will need to enter a command CREATE DATABASE from the MySQL command line. You will need to replace using your database name and this must not have spaces. The commands need not be in upper-case and all the MySQL commands have to end with “;”. You must them show the list of available databases through a command SHOW DATABASES. This allows you to view a MYSQL database along with a text database.
You have to choose your database to be able to edit it. So, you can enter the command USE with the database name and you will get to view a message that the database is changed. So, your active database is the one that you have created. You can then proceed to create a table to store your database information. You must enter table formatting specifications in your initial command. The INT or integer and CHAR or character commands will indicate the kind of data which will be allowed in these fields. When the table is created, you are free to enter your data. You may even make multiple entries using one command. Once the database has been fully built, you can run a query on it.