11/07/2022
optimize mysql

Show mysql database size

SELECT table_schema "DB Name", Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB"
 FROM information_schema.tables
 GROUP BY table_schema

See real file size

du -hs /root/docker/mysql/data/*/

optimize mysql

 docker exec -ti mysql mysqlcheck -u root -p -o monitoring;
 docker exec -ti mysql mysqlcheck -u root -p -o --all-databases;