MySQL Tutorial

Creating and Deleting Databases

Creating a Database

The CREATE statement is used to create a database in MySQL. The following statement creates a database called search.

mysql> CREATE DATABASE search;

To let MySQL know that you want to use that database, you use the USE statement. The following example uses the database, search.

mysql> USE search;

Deleting a Database

Databases can be deleted using the DROP statement. The following example deletes the database, search.

mysql> DROP DATABASE search;

You might also like...


About the author

Gez Lemon United Kingdom

I'm available for contract work. Please visit Juicify for details.

Interested in writing for us? Find out more.


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Some people, when confronted with a problem, think "I know, I’ll use regular expressions." Now they have two problems.” - Jamie Zawinski