1

Я запускаю сервер LAMP в Digital Ocean с установкой WordPress для веб-сайта друга. Я недавно перевел его из AWS. Произошел сбой, и я получил сообщение об Error establishing database connection . Я обнаружил, что MySQL перестал работать, поэтому я перезапустил его. Сайт работает сейчас, но я боюсь, что он снова рухнет.

Вот журналы:

2019-02-11T12:46:04.647354Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-02-11T12:46:04.658710Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.25-0ubuntu0.18.04.2) starting as process 13178 ...
2019-02-11T12:46:04.683378Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-02-11T12:46:04.683423Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-02-11T12:46:04.683429Z 0 [Note] InnoDB: Uses event mutexes
2019-02-11T12:46:04.683434Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-02-11T12:46:04.683451Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-02-11T12:46:04.683484Z 0 [Note] InnoDB: Using Linux native AIO
2019-02-11T12:46:04.684680Z 0 [Note] InnoDB: Number of pools: 1
2019-02-11T12:46:04.688086Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-02-11T12:46:04.701706Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-02-11T12:46:04.704353Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2019-02-11T12:46:04.704377Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2019-02-11T12:46:04.704385Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-02-11T12:46:04.704394Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-02-11T12:46:04.704400Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-02-11T12:46:04.704412Z 0 [ERROR] Failed to initialize builtin plugins.
2019-02-11T12:46:04.704417Z 0 [ERROR] Aborting

2019-02-11T12:46:04.709129Z 0 [Note] Binlog end
2019-02-11T12:46:04.709197Z 0 [Note] Shutting down plugin 'CSV'
2019-02-11T12:46:04.709559Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2019-02-11T12:46:05.385154Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-02-11T12:46:05.387281Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.25-0ubuntu0.18.04.2) starting as process 13213 ...
2019-02-11T12:46:05.400665Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-02-11T12:46:05.400710Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-02-11T12:46:05.400716Z 0 [Note] InnoDB: Uses event mutexes
2019-02-11T12:46:05.400722Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-02-11T12:46:05.400727Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-02-11T12:46:05.400732Z 0 [Note] InnoDB: Using Linux native AIO
2019-02-11T12:46:05.401035Z 0 [Note] InnoDB: Number of pools: 1
2019-02-11T12:46:05.401165Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-02-11T12:46:05.405573Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-02-11T12:46:05.405629Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2019-02-11T12:46:05.405641Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2019-02-11T12:46:05.405647Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-02-11T12:46:05.405654Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-02-11T12:46:05.405659Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-02-11T12:46:05.405665Z 0 [ERROR] Failed to initialize builtin plugins.
2019-02-11T12:46:05.405669Z 0 [ERROR] Aborting

2019-02-11T12:46:05.417138Z 0 [Note] Binlog end
2019-02-11T12:46:05.417206Z 0 [Note] Shutting down plugin 'CSV'
2019-02-11T12:46:05.417535Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2019-02-11T12:46:06.132732Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-02-11T12:46:06.134944Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.25-0ubuntu0.18.04.2) starting as process 13252 ...
2019-02-11T12:46:06.148774Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-02-11T12:46:06.148814Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-02-11T12:46:06.150943Z 0 [Note] InnoDB: Uses event mutexes
2019-02-11T12:46:06.150956Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-02-11T12:46:06.150962Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-02-11T12:46:06.150967Z 0 [Note] InnoDB: Using Linux native AIO
2019-02-11T12:46:06.151245Z 0 [Note] InnoDB: Number of pools: 1
2019-02-11T12:46:06.151365Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-02-11T12:46:06.153460Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-02-11T12:46:06.153515Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2019-02-11T12:46:06.153525Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2019-02-11T12:46:06.153531Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-02-11T12:46:06.153538Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-02-11T12:46:06.153543Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-02-11T12:46:06.153549Z 0 [ERROR] Failed to initialize builtin plugins.
2019-02-11T12:46:06.153554Z 0 [ERROR] Aborting

2019-02-11T12:46:06.164914Z 0 [Note] Binlog end
2019-02-11T12:46:06.164990Z 0 [Note] Shutting down plugin 'CSV'
2019-02-11T12:46:06.165331Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2019-02-11T12:46:06.886427Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-02-11T12:46:06.892617Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.25-0ubuntu0.18.04.2) starting as process 13291 ...
2019-02-11T12:46:06.927400Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-02-11T12:46:06.927480Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-02-11T12:46:06.927489Z 0 [Note] InnoDB: Uses event mutexes
2019-02-11T12:46:06.927495Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-02-11T12:46:06.927500Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-02-11T12:46:06.927505Z 0 [Note] InnoDB: Using Linux native AIO
2019-02-11T12:46:06.932089Z 0 [Note] InnoDB: Number of pools: 1
2019-02-11T12:46:06.932332Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-02-11T12:46:06.960416Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-02-11T12:46:06.960486Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2019-02-11T12:46:06.960497Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2019-02-11T12:46:06.960503Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-02-11T12:46:06.960513Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-02-11T12:46:06.960519Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-02-11T12:46:06.960525Z 0 [ERROR] Failed to initialize builtin plugins.
2019-02-11T12:46:06.960530Z 0 [ERROR] Aborting

2019-02-11T12:46:06.968342Z 0 [Note] Binlog end
2019-02-11T12:46:06.968413Z 0 [Note] Shutting down plugin 'CSV'
2019-02-11T12:46:06.968749Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2019-02-11T12:46:07.630976Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-02-11T12:46:07.637157Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.25-0ubuntu0.18.04.2) starting as process 13330 ...
2019-02-11T12:46:07.646460Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-02-11T12:46:07.646495Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-02-11T12:46:07.646501Z 0 [Note] InnoDB: Uses event mutexes
2019-02-11T12:46:07.646506Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-02-11T12:46:07.646512Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-02-11T12:46:07.646517Z 0 [Note] InnoDB: Using Linux native AIO
2019-02-11T12:46:07.646820Z 0 [Note] InnoDB: Number of pools: 1
2019-02-11T12:46:07.646953Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-02-11T12:46:07.657012Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-02-11T12:46:07.657071Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2019-02-11T12:46:07.657082Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2019-02-11T12:46:07.657088Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-02-11T12:46:07.657096Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-02-11T12:46:07.657101Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-02-11T12:46:07.657108Z 0 [ERROR] Failed to initialize builtin plugins.
2019-02-11T12:46:07.657112Z 0 [ERROR] Aborting

2019-02-11T12:46:07.664501Z 0 [Note] Binlog end
2019-02-11T12:46:07.664568Z 0 [Note] Shutting down plugin 'CSV'
2019-02-11T12:46:07.664907Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2019-02-11T18:30:32.001526Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-02-11T18:30:32.008096Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.25-0ubuntu0.18.04.2) starting as process 15177 ...
2019-02-11T18:30:32.020450Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-02-11T18:30:32.020488Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-02-11T18:30:32.020495Z 0 [Note] InnoDB: Uses event mutexes
2019-02-11T18:30:32.020501Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-02-11T18:30:32.020511Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-02-11T18:30:32.020517Z 0 [Note] InnoDB: Using Linux native AIO
2019-02-11T18:30:32.021674Z 0 [Note] InnoDB: Number of pools: 1
2019-02-11T18:30:32.024458Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-02-11T18:30:32.027778Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-02-11T18:30:32.048894Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-02-11T18:30:32.052604Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-02-11T18:30:32.070698Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-02-11T18:30:32.074927Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 198219821
2019-02-11T18:30:32.074948Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 198219830
2019-02-11T18:30:32.074956Z 0 [Note] InnoDB: Database was not shutdown normally!
2019-02-11T18:30:32.074962Z 0 [Note] InnoDB: Starting crash recovery.
2019-02-11T18:30:32.284797Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2019-02-11T18:30:32.284833Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-02-11T18:30:32.284897Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-02-11T18:30:32.305918Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-02-11T18:30:32.307124Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2019-02-11T18:30:32.307146Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2019-02-11T18:30:32.307448Z 0 [Note] InnoDB: Waiting for purge to start
2019-02-11T18:30:32.357698Z 0 [Note] InnoDB: 5.7.25 started; log sequence number 198219830
2019-02-11T18:30:32.358000Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2019-02-11T18:30:32.358645Z 0 [Note] Plugin 'FEDERATED' is disabled.
2019-02-11T18:30:32.367822Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190211 18:30:32
2019-02-11T18:30:32.372021Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2019-02-11T18:30:32.372052Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2019-02-11T18:30:32.372069Z 0 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
2019-02-11T18:30:32.372117Z 0 [Note] Server socket created on IP: '127.0.0.1'.
2019-02-11T18:30:32.374574Z 0 [ERROR] /usr/sbin/mysqld: Table './mysql/user' is marked as crashed and should be repaired
2019-02-11T18:30:32.374807Z 0 [Warning] Checking table:   './mysql/user'
2019-02-11T18:30:32.374828Z 0 [ERROR] 1 client is using or hasn't closed the table properly
2019-02-11T18:30:32.376040Z 0 [ERROR] /usr/sbin/mysqld: Table './mysql/db' is marked as crashed and should be repaired
2019-02-11T18:30:32.376258Z 0 [Warning] Checking table:   './mysql/db'
2019-02-11T18:30:32.376276Z 0 [ERROR] 1 client is using or hasn't closed the table properly
2019-02-11T18:30:32.417495Z 0 [Note] Event Scheduler: Loaded 0 events
2019-02-11T18:30:32.417717Z 0 [Note] /usr/sbin/mysqld: ready for connections.

Я посмотрел некоторые из ошибок, и одно предложение сказал, чтобы настроить файл подкачки. Я забыл сделать это при первоначальной настройке сервера, но я сделал это сейчас. Этого достаточно, чтобы решить все эти проблемы?

В журналах говорится, что БД вышла из строя и должна быть исправлена, но когда я запускаю mysqlcheck -uroot -p --repair --all-databases , я получаю сообщение об ошибке:

Предупреждение: пожалуйста, не изменяйте таблицу gtid_executed. Это внутренняя системная таблица mysql для хранения идентификаторов GTID для совершенных транзакций. Его изменение может привести к несовместимому состоянию GTID

Кроме того, почти все базы данных возвращаются

Запоминающее устройство для стола не поддерживает ремонт

Я не так хорош в MySQL, была бы признательна за помощь.

РЕДАКТИРОВАТЬ - *** Вот мои журналы MySql после создания файла подкачки и следуя указаниям ИТ-службы Pimp Juice для копирования и воссоздания mysql.user и mysql.db.

2019-02-14T01:11:32.323393Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.25-0ubuntu0.18.04.2) starting as process 13773 ...
2019-02-14T01:11:32.330267Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-02-14T01:11:32.330314Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-02-14T01:11:32.330320Z 0 [Note] InnoDB: Uses event mutexes
2019-02-14T01:11:32.330325Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-02-14T01:11:32.330331Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-02-14T01:11:32.330336Z 0 [Note] InnoDB: Using Linux native AIO
2019-02-14T01:11:32.330711Z 0 [Note] InnoDB: Number of pools: 1
2019-02-14T01:11:32.331148Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-02-14T01:11:32.335469Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-02-14T01:11:32.349062Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-02-14T01:11:32.351877Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-02-14T01:11:32.367267Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-02-14T01:11:32.398365Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-02-14T01:11:32.398456Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-02-14T01:11:32.427196Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-02-14T01:11:32.428313Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2019-02-14T01:11:32.428334Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2019-02-14T01:11:32.428694Z 0 [Note] InnoDB: Waiting for purge to start
2019-02-14T01:11:32.478973Z 0 [Note] InnoDB: 5.7.25 started; log sequence number 235030084
2019-02-14T01:11:32.479462Z 0 [Note] Plugin 'FEDERATED' is disabled.
2019-02-14T01:11:32.479792Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2019-02-14T01:11:32.497280Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2019-02-14T01:11:32.497320Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2019-02-14T01:11:32.497341Z 0 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
2019-02-14T01:11:32.497378Z 0 [Note] Server socket created on IP: '127.0.0.1'.
2019-02-14T01:11:32.529140Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190214  1:11:32
2019-02-14T01:11:32.551263Z 0 [Note] Event Scheduler: Loaded 0 events
2019-02-14T01:11:32.551501Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.25-0ubuntu0.18.04.2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
2019-02-14T01:12:57.820655Z 7 [Note] Access denied for user 'ryan'@'localhost' (using password: NO)
2019-02-14T01:15:49.115479Z 0 [Note] Giving 0 client threads a chance to die gracefully
2019-02-14T01:15:49.115520Z 0 [Note] Shutting down slave threads
2019-02-14T01:15:49.115529Z 0 [Note] Forcefully disconnecting 0 remaining clients
2019-02-14T01:15:49.115537Z 0 [Note] Event Scheduler: Purging the queue. 0 events
2019-02-14T01:15:49.115660Z 0 [Note] Binlog end
2019-02-14T01:15:49.117415Z 0 [Note] Shutting down plugin 'auth_socket'
2019-02-14T01:15:49.117434Z 0 [Note] Shutting down plugin 'ngram'
2019-02-14T01:15:49.117438Z 0 [Note] Shutting down plugin 'partition'
2019-02-14T01:15:49.117443Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2019-02-14T01:15:49.117448Z 0 [Note] Shutting down plugin 'ARCHIVE'
2019-02-14T01:15:49.117464Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2019-02-14T01:15:49.117501Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2019-02-14T01:15:49.117506Z 0 [Note] Shutting down plugin 'MyISAM'
2019-02-14T01:15:49.117513Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2019-02-14T01:15:49.117517Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2019-02-14T01:15:49.117521Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2019-02-14T01:15:49.117524Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2019-02-14T01:15:49.117527Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2019-02-14T01:15:49.117531Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2019-02-14T01:15:49.117534Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2019-02-14T01:15:49.117537Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2019-02-14T01:15:49.117540Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2019-02-14T01:15:49.117544Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2019-02-14T01:15:49.117547Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2019-02-14T01:15:49.117550Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2019-02-14T01:15:49.117553Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2019-02-14T01:15:49.117557Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2019-02-14T01:15:49.117560Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2019-02-14T01:15:49.117563Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2019-02-14T01:15:49.117566Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2019-02-14T01:15:49.117570Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2019-02-14T01:15:49.117573Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2019-02-14T01:15:49.117576Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2019-02-14T01:15:49.117580Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2019-02-14T01:15:49.117583Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2019-02-14T01:15:49.117586Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2019-02-14T01:15:49.117590Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2019-02-14T01:15:49.117593Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2019-02-14T01:15:49.117596Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2019-02-14T01:15:49.117599Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2019-02-14T01:15:49.117603Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2019-02-14T01:15:49.117606Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2019-02-14T01:15:49.117609Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2019-02-14T01:15:49.117613Z 0 [Note] Shutting down plugin 'InnoDB'
2019-02-14T01:15:49.122626Z 0 [Note] InnoDB: FTS optimize thread exiting.
2019-02-14T01:15:49.122808Z 0 [Note] InnoDB: Starting shutdown...
2019-02-14T01:15:49.223291Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2019-02-14T01:15:49.223542Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 190214  1:15:49
2019-02-14T01:15:50.436146Z 0 [Note] InnoDB: Shutdown completed; log sequence number 235125993
2019-02-14T01:15:50.439129Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2019-02-14T01:15:50.439170Z 0 [Note] Shutting down plugin 'MEMORY'
2019-02-14T01:15:50.439181Z 0 [Note] Shutting down plugin 'CSV'
2019-02-14T01:15:50.439190Z 0 [Note] Shutting down plugin 'sha256_password'
2019-02-14T01:15:50.439195Z 0 [Note] Shutting down plugin 'mysql_native_password'
2019-02-14T01:15:50.439475Z 0 [Note] Shutting down plugin 'binlog'
2019-02-14T01:15:50.440036Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2019-02-14T01:15:50.777735Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-02-14T01:15:50.779938Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.25-0ubuntu0.18.04.2) starting as process 14025 ...
2019-02-14T01:15:50.785356Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-02-14T01:15:50.785392Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-02-14T01:15:50.785409Z 0 [Note] InnoDB: Uses event mutexes
2019-02-14T01:15:50.785415Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-02-14T01:15:50.785420Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-02-14T01:15:50.785425Z 0 [Note] InnoDB: Using Linux native AIO
2019-02-14T01:15:50.785730Z 0 [Note] InnoDB: Number of pools: 1
2019-02-14T01:15:50.785867Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-02-14T01:15:50.790011Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-02-14T01:15:50.800479Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-02-14T01:15:50.803193Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-02-14T01:15:50.815660Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-02-14T01:15:50.832348Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-02-14T01:15:50.832440Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-02-14T01:15:50.852215Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-02-14T01:15:50.853258Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2019-02-14T01:15:50.853278Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2019-02-14T01:15:50.853589Z 0 [Note] InnoDB: Waiting for purge to start
2019-02-14T01:15:50.903857Z 0 [Note] InnoDB: 5.7.25 started; log sequence number 235125993
2019-02-14T01:15:50.904272Z 0 [Note] Plugin 'FEDERATED' is disabled.
2019-02-14T01:15:50.910678Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2019-02-14T01:15:50.910702Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2019-02-14T01:15:50.910720Z 0 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
2019-02-14T01:15:50.910755Z 0 [Note] Server socket created on IP: '127.0.0.1'.
2019-02-14T01:15:50.911679Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2019-02-14T01:15:50.914945Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190214  1:15:50
2019-02-14T01:15:50.923429Z 0 [Note] Event Scheduler: Loaded 0 events
2019-02-14T01:15:50.923699Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.25-0ubuntu0.18.04.2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)

Я думаю, что теперь все в порядке. Вероятно, это была просто проблема с памятью. Спасибо Pimp Juice IT.

1 ответ1

2

MySQL Started Option

Если вы можете подключиться к экземпляру MySQL, даже если в сообщении об ошибке указано, что таблица потерпела крах, вы можете скопировать данные из существующих таблиц в промежуточную таблицу, обрезать исходную системную таблицу и затем вставить записи обратно в исходную таблицу из промежуточная таблица загрузки.

Скопируйте и воссоздайте таблицу mysql.user

create table mysql.new_user like mysql.user;
insert mysql.new_user select * from mysql.user;
truncate table mysql.user;
insert mysql.user select * from mysql.new_user;

Скопируйте и создайте заново таблицу mysql.db

create table mysql.new_db like mysql.db;
insert mysql.new_db select * from mysql.db;
truncate table mysql.db;
insert mysql.db select * from mysql.new_db;

Примечание. Ответ на этот вариант 1 был вдохновлен тем, как я могу восстановить таблицу InnoDB?Совет


MySQL не запускает параметры

Согласно некоторым комментариям о принудительном восстановлении InnoDB люди говорят, что установка innodb_force_recovery = 1 в разделе [mysqld] файла параметров my.cnf перед перезапуском сервера позволит вам запустить его, если он не запускается полностью.

После того, как вы запустите MySQL, вы можете запустить SQL-операторы MySQL Started Option, как я перечислил выше, впоследствии удалить innodb_force_recovery = 1 или вернуть ему значение, которое было до изменения, а затем перезапустить службу MySQL и посмотреть именно это решает проблему с поврежденными данными таблиц.

Еще одна попытка, когда у вас есть innodb_force_recovery = 1 и служба MySQL, запущенная в этом режиме, состоит в экспорте или резервном копировании поврежденных таблиц (или всех баз данных), а затем удалите параметр innodb_force_recovery = 1 и перезапустите MySQL и посмотрите, что произойдет.


Если все остальное терпит неудачу

Вы всегда можете перенести другую копию этой системы из AWS, убедитесь, что параметры файла подкачки настроены соответствующим образом, прежде чем запускать службу MySQL, когда вы подготовитесь к запуску из новой передачи AWS.

И последнее, но не менее важное: вы всегда можете восстановить свою систему из последних файлов резервных копий MySQL и тому подобного.


бонус

Я полагаю, что это будет применяться только к экземплярам MySQL для СУБД MyISAM но на всякий случай или кто-то ищет такое решение.

В одном окне cmd ...

mysqld –-console –-skip-grant-tables –-skip-external-locking 

В другой ...

mysqlcheck –repair mysql user 

Если это не поможет, вам, возможно, придется восстановить базу данных mysql из резервной копии.

После того, как какой-либо метод решит проблему, выполните завершение работы mysqladmin и перезапустите сервер mysql в обычном режиме.

Источник

Я считаю, что параметр --console предназначен только для Windows, поэтому, если у вас возникли проблемы с этим, просто пропустите его в команде и используйте mysqld –-skip-grant-tables –-skip-external-locking .


Дополнительные ресурсы

Всё ещё ищете ответ? Посмотрите другие вопросы с метками .