Create MySQL database on Linux Ubuntu

As always I use Ubuntu server. Prerequisite for this action is to have MySQL server installed and you can find tutorial under Databases section.

Start by login to your MySQL server with following commands:

mysql -u root -p

Provide root password and you should see prompt   mysql>.

Please verify current status of databases on server. Type following:

show databases;

You should see your databases status as follows:

| Database |
| information_schema |
| mysql |
| performance_schema |

Please, have in mint that any command you type on database server must be finished with semicolon. NOw type following command in order to create database:

mysql> create database test_database;

As you can see I just created database named test_databese. Verify that by repeating show databases; command.

Most frequently used command for deleting database is drop, so you can now delete your database as follows:

mysql> drop database test_database;

I hope that this tutorial was informative to you and thank you for visiting this website.

Dejan Dzodan

Dejan Dzodan

IT professional for more then 15 years, mostly in financial institutions but with experience in ISP and retail. Proven in networking and overall infrastructure projects. Cisco instructor.

Leave a Reply

Your email address will not be published. Required fields are marked *

1 + 2 =