Why Mysql DB Table Rows Disappearing

Nhan Huynh
Nhan Huynh used Ask the Experts™
Dear Experts,

I am currently experiencing data loss issues on magento table (name  catalog_product_entity_group_price) .
After the insert and check with the count command, the record is still sufficient. But after a while, especially when running price index script, I check the that table again, some record rows are disappeared.

Please help me, why Mysql DB Table Rows Disappearing, other reason can cause row loss in mysql ?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David FavorFractional CTO
Distinguished Expert 2018

Be sure you actually have rows missing. If rows still exist + only column data goes missing, this is likely due to overall row length being exceeded.

If you refer to your logs (and have sufficient logging configured) you'll instantly find the problem.

Also, be sure you're running mysqltuner on a regular basis + working to quiet all diagnostics produced.

Big Fix: If you really are using MySQL, then remove MySQL software packages (leaving /var/lib/mysql data in place), then install latest MariaDB packages from the official repositories.

Many Distros have/are dropping MySQL completely + installing MariaDB packages when MySQL package targets are installed.

Many MySQL versions, especially older versions, have all sorts of bugs. Use MariaDB instead, to ensure you're starting with stable/working database code.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial