Backup and restore MySQL db

Problem
There are unrecovery problems in Ibdata log files

Solution
# login to mysql:
> mysql -u admin -p

mysql> show databases;

# per each db dump all data

> mysqldump -u admin -p database | gzip -9 > database.sql.gz

# Now Ibdata log files can be deleted

> service mysqld restart

# Restore all dbs from dump files

gunzip < database.sql.gz | mysql -u admin -p database
# Retype password for DB users.

May 29, 2018