Site Tools


linux:general:mysql

This is an old revision of the document!


FIXME

MySQL

Install

Configure

Backup and Restore

Backup

Backup a single Table in a database

mysqldump <db> <table> > dump.sql

Backup all tables in a single database

mysqldump <db> > dump.sql

Backup all tables in all databases

mysqldump --all-databases > dump.sql

Also check out a script to backup all databases from my collegue Tom wiki.tmade.de - Backup MySQL

Restore

mysql < dump.sql

Also check out a script to restore databases from my collegue Tom wiki.tmade.de - Restore MySQL

Commands

Command Function
mysqldump -
mysqlcheck --repair --databases <db> Repair data types and character sets of a single db changed by updates
mysqlcheck --repair --all-databases Repair data types and character sets of all dbs changed by updates
mysql -uroot -p -h 127.0.0.1 -P 3306 Connect to mysql, enter password after execution

Troubleshooting

linux/general/mysql.1559823963.txt.gz · Last modified: 2019/06/06 14:26 by lunetikk