Skip to main content

MySQL Cheat Sheet

SSH repair and optimize all MySQL databases:

# /usr/bin/mysqlcheck --repair --all-databases --password=xxxxxx

# /usr/bin/mysqlcheck --optimize --all-databases --password=xxxxxx

 

Upgrade/Downgrade to MySQL 4.x:

backup database:

# cd /root

# /usr/bin/mysqldump --create-options --compatible=mysql40 --all-databases --force --user=root --password=xxxx > backup.sql

Post new comment

The content of this field is kept private and will not be shown publicly.