MYSQL RECOVERY
Конфигурационный файл для восстановления работы MySQL при поврежденных таблицах MySQL — файл можно использовать временно заменив им /etc/mysql/my.cnf
[mysql]
#CLIENT
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld]
#GENERAL
user = mysql
default-storage-engine = InnoDB
innodb_large_prefix = 1
innodb_file_format = Barracuda
innodb_file_per_table = true
innodb_large_prefix = ON
socket = /var/run/mysqld/mysqld.sock
socket = /var/run/mysqld/mysqld-recovery.sock
pid-file = /var/run/mysqld/mysqld.pid
character_set_server = utf8
skip-external-locking
#SAFETY
max-allowed-packet = 16M
max-connect-errors = 1000000
skip-name-resolve
sql-mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY
sysdate-is-now = 1
innodb = FORCE
#DATA STORAGE
datadir = /var/lib/mysql/
tmpdir = /var/tmp/mysql/
#BINARY LOGGING
log-bin = /var/lib/mysql/mysql-bin
expire-logs-days = 14
sync-binlog = 1
#CACHES AND LIMITS
tmp-table-size = 512M
max-heap-table-size = 512M
max-heap-table-size = 64M
query-cache-type = 1
query_cache_limit = 256K
query-cache-size = 512M
query-cache-size = 64M
max-connections = 200
thread-cache-size = 128
open-files-limit = 65535
table-definition-cache = 4096
table-open-cache = 512
join_buffer_size = 512
query_cache_type = ON
max_connections = 600
connect_timeout = 5
wait_timeout = 600
max_allowed_packet = 16M
thread_cache_size = 128
sort_buffer_size = 16M
sort_buffer_size = 4M
bulk_insert_buffer_size = 16M
#INNODB
innodb-flush-method = O_DIRECT
innodb-log-files-in-group = 2
innodb-log-file-size = 128M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
innodb-buffer-pool-size = 3G
innodb-buffer-pool-instances = 3
#RECOVERY! COMMENT AT PRODUCTION!
innodb_force_recovery = 6
innodb_corrupt_table_action = salvage
skip-grant-tables
skip-networking
#RECOVERY
#MyISAM
key-buffer-size = 128M
table_open_cache = 400
myisam_sort_buffer_size = 18M
myisam-recover-options = FORCE,BACKUP
myisam-sort-buffer-size = 32M
read_buffer_size = 128M
read_buffer_size = 4M
read_rnd_buffer_size = 256M
#LOGGING
log-error = /var/log/mysql/mysql-err.log
log-queries-not-using-indexes = 1
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow-queries.log
long_query_time = 1
log_slow_filter = filesort_on_disk,tmp_table_on_disk
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow-queries.log
long_query_time = 1
log_slow_filter = filesort_on_disk,tmp_table_on_disk
Только полноправные пользователи могут оставлять комментарии. Аутентифицируйтесь пожалуйста, используя сервисы.