Quick answer
Edit config.inc.php and set $cfg['MaxExactCount'] = 0; to force exact counts for all tables. Or upgrade to MariaDB 10.3+ which stores exact row counts in information_schema.
Why does phpMyAdmin show approximate row counts?
If you're using InnoDB tables (which most of you are), SHOW TABLE STATUS gives an estimated row count. InnoDB doesn't keep a running exact count – it's too expensive for transaction-heavy databases. So phpMyAdmin shows the estimate with an "Approximate" label.
I had a client last month who panicked because her WooCommerce orders table showed "Approximate: 5,000" but she had 12,000 orders. The store was fine, but the number scared her.
By default, phpMyAdmin uses a threshold. If a table has more rows than $cfg['MaxExactCount'] (default is 20,000), it shows the approximation. You can change that.
Step-by-step fix
- Find your phpMyAdmin config file. Usually at
/etc/phpmyadmin/config.inc.phpor/usr/share/phpmyadmin/config.inc.phpon Linux. On Windows, it's in the phpMyAdmin folder. - Open it in a text editor (e.g.,
sudo nano /etc/phpmyadmin/config.inc.php). - Add or change this line:
Setting it to$cfg['MaxExactCount'] = 0;0tells phpMyAdmin to always do an exact count, no matter how many rows. - Save the file and restart your web server:
Or for Nginx:sudo systemctl restart apache2sudo systemctl restart nginx - Refresh phpMyAdmin and check any table. The "Approximate" label should be gone. You'll now see exact numbers like
12,347instead of~12,000.
What if the fix doesn't work?
If you still see approximate counts, try these:
- Check the value in
$cfg['Servers'][$i]['MaxExactCount']– some setups override the global setting per server. Add the line inside the server array block. - Clear your browser cache – phpMyAdmin caches some info. Hard refresh (Ctrl+F5) or clear cookies.
- Switch to MariaDB 10.3+ – This version stores exact row counts in
information_schema.TABLES.ROW_COUNT. phpMyAdmin 5.0+ uses it automatically. If you're still on MySQL 5.7 or older, this fix works but MariaDB is better.
Prevention tip
Don't set MaxExactCount too low on huge tables (millions of rows). Exact counts on a 10-million-row InnoDB table can take 10–30 seconds and slow down phpMyAdmin. A better approach: keep the default threshold at 20,000 or raise it to 100,000 if your server can handle it. Use $cfg['MaxExactCount'] = 100000; – that way small tables show exact counts quickly, and huge ones fall back to approximation.
If you're on shared hosting and can't edit config files, ask your host to increase MaxExactCount or upgrade to MariaDB 10.3+. Most decent hosts will do it with a ticket.
Real-world story: I had a dental clinic client with a 4-million-row appointments table. Setting
MaxExactCount = 0crashed phpMyAdmin because the query took 45 seconds. Had to revert it to 500,000 and live with approximations for that one table. Moral of the story: test first.