4

As per the title, I'm struggling to find out if it's safe to delete the innodb schema that's created on a fresh Amazon RDS instance.

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| innodb             | -- This was automatically created when the instance was created
| mysql              |
| performance_schema |
+--------------------+

I know it's not doing any harm being sat there - there's no tables/content or anything, I'm just curious as to why it's there and I've not been able to find out why from any other sources.

4

There is a reason you cannot touch the innodb database.

This is where Amazon stores the system tablespace file ibdata1

If you run

SHOW GLOBAL VARIABLES LIKE 'innodb_data_home_dir';

you might see something like this

/rdsdbdata/db/innodb

It will point to this folder as the base of InnoDB.

If you run

SHOW GLOBAL VARIABLES LIKE 'innodb_log_group_home_dir';

you might see something like this

/rdsdbdata/log/innodb

This is where ib_logfile0 and ib_logfile1 live.

If you run

use innodb
show tables;

you will see nothing because there are no .frm files in it.

Even though the innodb database contains no storage engine data files (.frm or .ibd), you cannot drop the innodb database because the folder /rdsdbdata/db/innodb is not empty.

1

Hmm, regardless of whether it's safe to delete the innodb schema or not, RDS won't let you do it anyway (tested on a temporary test instance):

DROP DATABASE `innodb`;

Error dropping database (can't rmdir './innodb/', errno: 17)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.