MySQL database file MYD not updating
Posted by: dran (---.s4139.c3-0.tlg-cbr4.atw-tlg.pa.cable.rcncustomer.com)
Date: February 03, 2021 12:31AM

I understand that MySQL table data gets stored in MYD files in the following folder:

C:\wamp64\bin\mysql\mysql8.0.18\data\

But those files in there have timestamps from yesterday! And I have updated my database records all day today!

Why aren't those data files being updated? I want to set up automatic backup of the files containing my database data, but first I want to understand why the files are not updating with every save. Thanks!

Options: ReplyQuote
Re: MySQL database file MYD not updating
Posted by: Otomatic (Moderator)
Date: February 03, 2021 09:00AM

Hi,

This is not the responsibility of Wampserver. See at MySQL.

The MYD files are not the only files to constitute a database, several other files are taken into account: ib_logfile0, ibdata1, mysql.ibd, and others.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.4 32 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33 - MariaDB 10.5.9
Wampserver 3.2.4 64 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33/8.0.23 - MariaDB 10.5.9
PhPMyadmin 5.0.4 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »



Edited 1 time(s). Last edit at 02/03/2021 10:16AM by Otomatic.

Options: ReplyQuote
Re: MySQL database file MYD not updating
Posted by: dran (---.s4139.c3-0.tlg-cbr4.atw-tlg.pa.cable.rcncustomer.com)
Date: February 03, 2021 10:27PM

I tested. Looks like the MYD files actually DO get updated right away. But Windows fails to update the "Date modified" timestamp. I have no idea why, but it doesn't matter. All I wanted was to ensure the data was saved to disk and not sitting in memory somewhere. Thanks.

Options: ReplyQuote
Re: MySQL database file MYD not updating
Posted by: Otomatic (Moderator)
Date: February 04, 2021 09:29AM

Hi,

I think you're forgetting a "trick"!
MySQL uses a cache and this cache will actually be written only when the MySQL service is stopped, so either when you quit Wampserver or when you shut down Windows.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.4 32 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33 - MariaDB 10.5.9
Wampserver 3.2.4 64 bit - Apache 2.4.46c - PHP 8.0.2…5.6.40 - MySQL 5.7.33/8.0.23 - MariaDB 10.5.9
PhPMyadmin 5.0.4 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote


Sorry, only registered users may post in this forum.