MySQL InnoDB table shows a negative number of rows in phpMyAdmin

innodbmyisamMySQL

I just converted a MyISAM table to InnoDB with around 1.4 million rows. When I converted it to InnoDB, it now shows -1.4 million rows. The table still works as expected, but why does it shows negative in the rows column?

Best Answer

If you look closely, you'll notice it's not a negative sign, it's a tilde, which means "approximately".

InnoDB tables do not store the exact count of rows in the table, so you are being shown approximately how many rows are in the table.

If you use the COUNT(*) function you can retrieve the exact number of rows.