How to Delete MySQL Database on Raspberry Pi
Deleting a database is simpler than creating it. You can follow the guide here if you don’t know how to create a database and what tools are required for creating a web server.
Once you have a database created on your system, it’s now time to find out the list of databases on your Raspberry Pi system. For this purpose, you first open the MySQL database via the below-mentioned command:
Now, to view the databases list, hit the following command:
The above command shows you the MySQL databases list you created on your Raspberry Pi system.
To delete or remove any MySQL database, use the following command:
The above command successfully deletes the MySQL database from your Raspberry Pi system and you can now create the same database with the updated information.
You can view the MySQL database list again to confirm the database has been successfully removed.
In this way, you can also remove other databases and free up the MySQL database system.
Conclusion
Removing the MySQL database on the Raspberry Pi system is important since it allows you to clean your database system and remove those databases that are no longer useful. To remove any database, you enter the MySQL database system through the “mysql” command and then view the created databases through the “show DATABASES” command. Afterward, you can choose any database and delete it from MySQL database through the “DROP DATABASE” command.