We are upgrading our website and I was checking on the size of the new database compared to the old one and was really surprised to find that in the /var/lib/mysql/ directory, the only files there were the .frm files. I searched the entire HDD for the .MYD files but the only ones are from the old database. It is on a CentOS 6.6 system running MySQL 5.5.
Where would those files be located? At first I was worried that they might just be held in cache, and that if the server lost power all would be lost, but not so sure now.
Wow, awesome commands Rolando, here are the results which looks like the majority is not InnoDB, but I would have assumed it still would need to store the data in the same place, even if it was in a different format. Our old DB is 1.7GB when I use the du -h
in the /var/lib/mysql and the directory I care about is less than 1MB
+----------------+----------------------+----------------------+----------------------+
| Storage Engine | Data Size | Index Size | Table Size |
+----------------+----------------------+----------------------+----------------------+
| MEMORY | 0.000 GB | 0.000 GB | 0.000 GB |
| InnoDB | 0.151 GB | 0.059 GB | 0.210 GB |
| MyISAM | 1.381 GB | 0.227 GB | 1.608 GB |
| Total | 1.532 GB | 0.286 GB | 1.817 GB |
+----------------+----------------------+----------------------+----------------------+
+-----------------------+------------------------+
| VARIABLE_NAME | VARIABLE_VALUE |
+-----------------------+------------------------+
| INNODB_DATA_FILE_PATH | ibdata1:10M:autoextend |
| DATADIR | /var/lib/mysql/ |
| INNODB_FILE_PER_TABLE | OFF |
+-----------------------+------------------------+
Total MySQL Data and Index Usage By Storage Engine
and run that query please. Does it report any data ?SELECT variable_name FROM information_schema.global_variables WHERE variable_name IN ('datadir','innodb_file_per_table','innodb_data_file_path','innodb_data_home_dir');
What are the values ?SELECT * FROM information_schema.global_variables WHERE variable_name IN ('datadir','innodb_file_per_table','innodb_data_file_path','innodb_data_home_dir');