CLI Database optimization

MariaDB & MySQL:

sudo apt-get install mysql-client
mysqlcheck -h yourdatabasehost -u root -p –auto-repair –check –all-databases
mysqlcheck -h yourdatabasehost -u root -p –auto-repair –optimize –all-databases

PostgreSQL:

vacuumdb -afvz -h yourdatabasehost -u postgres
reindexdb -a -h yourdatabasehost -u postgres
Comments

Comments are Disabled