Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysql table not decreased in size after deleting rows

I deleted 1M rows from a database table. Surprisingly its size did not decrease. Then I have tried: FLUSH TABLES; but whey I ran this statement on phpMyAdmin of my cPanel then I encountered below error:

#1227 - Access denied; you need (at least one of) the RELOAD privilege(s) for this operation

How can I decrease my table size and clear its cache?

like image 898
VSB Avatar asked Nov 16 '25 09:11

VSB


2 Answers

Try optimize table command

OPTIMIZE TABLE <tablename>;
like image 149
pkmiec Avatar answered Nov 18 '25 12:11

pkmiec


In phpMyAdmin, click on the database name to show the tables in the main panel. Then tick the checkbox next to the table name you want to decrease, and in the "With selected" drop-down under the list of tables, choose "Optimize".

like image 24
Marc Delisle Avatar answered Nov 18 '25 11:11

Marc Delisle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!