HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Is it safe to delete the innodb schema on a new Amazon RDS instance?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
thenewdeleteinnodbinstanceamazonsaferdsschema

Problem

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.

Solution

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.

Code Snippets

SHOW GLOBAL VARIABLES LIKE 'innodb_data_home_dir';
/rdsdbdata/db/innodb
SHOW GLOBAL VARIABLES LIKE 'innodb_log_group_home_dir';
/rdsdbdata/log/innodb
use innodb
show tables;

Context

StackExchange Database Administrators Q#75627, answer score: 5

Revisions (0)

No revisions yet.