Is it safe to delete preinstalled MySQL databases like INFORMATION_SCHEMA?

I just installed the LAMP server and PHPMyAdmin. Once I logged in I noticed databases already created and within them tons of tables and rows.

My question of course is whether I can just delete them all without failing the system in any way. Below you see what I saw once I entered the first database.

One of four database preinstalled.


Solution 1:

INFORMATION_SCHEMA, PERFORMANCE_SCHEMA and mysql (and possibly more) are special system tables in MySQL. Please refer to the MySQL documentation on this. One excerpt:

Usage Notes for the INFORMATION_SCHEMA Database

INFORMATION_SCHEMA is a database within each MySQL instance, the place that stores information about all the other databases that the MySQL server maintains. The INFORMATION_SCHEMA database contains several read-only tables. They are actually views, not base tables, so there are no files associated with them, and you cannot set triggers on them. Also, there is no database directory with that name.

So, no, don't attempt to delete them. You need them in order to have a functional MySQL installation. Moreover, they're probably protected from any regular way of deleting/altering them.