Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| public:mysql [2022/07/19 23:44] – [database(s) backup] row lock speech Nico | public:mysql [2022/08/04 15:35] (current) – fix indent Nico | ||
|---|---|---|---|
| Line 121: | Line 121: | ||
| fi | fi | ||
| </ | </ | ||
| + | |||
| ==== slave setup ==== | ==== slave setup ==== | ||
| * copy and extract database backup on the slave | * copy and extract database backup on the slave | ||
| Line 129: | Line 130: | ||
| report-host = slave_name | report-host = slave_name | ||
| </ | </ | ||
| + | |||
| * unpack the snapshot | * unpack the snapshot | ||
| * Execute the following statement on the slave | * Execute the following statement on the slave | ||
| Line 139: | Line 141: | ||
| -> | -> | ||
| </ | </ | ||
| + | |||
| * Execute START SLAVE on the slave. | * Execute START SLAVE on the slave. | ||
| Line 147: | Line 150: | ||
| If MySQLTuner reports fragmented tables, you can check them all with: | If MySQLTuner reports fragmented tables, you can check them all with: | ||
| - | < | + | |
| + | < | ||
| mysqlcheck -o --all-databases | mysqlcheck -o --all-databases | ||
| </ | </ | ||
| + | |||
| ===== troubleshooting ===== | ===== troubleshooting ===== | ||
| Line 169: | Line 174: | ||
| ==== rebuild database indexes ==== | ==== rebuild database indexes ==== | ||
| - | < | + | < |
| - | # mysqlcheck -p -r -q -q < | + | # mysqlcheck -p -r -q -q < |
| </ | </ | ||
| Line 177: | Line 182: | ||
| * start MySQL without authentification | * start MySQL without authentification | ||
| - | < | + | |
| + | < | ||
| # / | # / | ||
| </ | </ | ||
| + | |||
| * connect to MySQL and change password | * connect to MySQL and change password | ||
| + | |||
| <code sql> | <code sql> | ||
| # mysql | # mysql | ||