Managing databases is a fundamental part of using MySQL. Here, you’ll learn how to create and delete databases with simple commands.
Use the CREATE DATABASE
command to make a new database.
CREATE DATABASE database_name;
Example: Create a database named myshop
:
CREATE DATABASE myshop;
Use DROP DATABASE
to permanently delete a database. Be careful — this removes all data inside!
DROP DATABASE database_name;
Example: Delete the database named myshop
:
DROP DATABASE myshop;
DROP DATABASE
to avoid accidental data loss!
Help others discover Technorank Learning by sharing your honest experience.
Your support inspires us to keep building!