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...

Comments

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.

Contribute

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.

“Anyone who considers arithmetic methods of producing random digits is, of course, in a state of sin.” - John von Neumann