Reputation: 57
I'm on Ubuntu 18.04 and I've installed XAMPP.
I've been checking folders and files for growing size inside /opt/lampp/var/mysql/
after adding hundreds of data inside my table and the size didn't change by a byte.
So I don't understand where my data is saved although I see the files are modified.
Upvotes: 0
Views: 176
Reputation: 12422
You should check MySQL for the path to the datadir, perhaps it isn't the folder you're checking. You can use the SQL command show variables like "%datadir%";
to see this information, but make sure to run it from the same MySQL instance that you're using for your other data, in case you have more than one database server installed and using different datadirs.
Since the datadir does match, my best guess is that you're using reclaimed space. In many instances, MySQL expands the file space on disk but doesn't shrink the file sizes when data is deleted. As seen by the file system, the size of the databases doesn't shrink even though MySQL has deleted records. Therefore, when you add more records, MySQL uses the reclaimed space first before expanding the size taken up on the file system. That's my best guess about what's going on in your case.
Upvotes: 1