[英]Not able to start MySQL service in Ubuntu 20.10
我在我的一個樹莓派 4(8 GB)上運行 MySQL v8 幾個月,但是我無法使用sudo service mysql start
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
這是否告訴我數據目錄可能存在問題? 從這種情況中恢復的任何解決方案?
systemctl status mysql.service
mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-02-02 18:08:10 IST; 1min 16s ago
Process: 3285 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 3294 ExecStart=/usr/sbin/mysqld (code=exited, status=2)
Main PID: 3294 (code=exited, status=2)
Status: "Server startup in progress"
2021-02-02T12:38:03.012089Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23-0ubuntu0.20.10.1) starting as process 3185
2021-02-02T12:38:03.059589Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-02-02T12:38:03.596555Z 1 [ERROR] [MY-013183] [InnoDB] Assertion failure: fil0fil.cc:10815:initial_fsize == (file->size * phy_page_size) thread 281473363472416
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
12:38:03 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0xaaaadfc38ef0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = ffff9fd7e690 thread_stack 0x46000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x44) [0xaaaaceb08ae4]
/usr/sbin/mysqld(handle_fatal_signal+0x294) [0xaaaacdd1e484]
linux-vdso.so.1(__kernel_rt_sigreturn+0) [0xffffacbaf5d8]
/lib/aarch64-linux-gnu/libc.so.6(gsignal+0xd8) [0xffffac24ef58]
/lib/aarch64-linux-gnu/libc.so.6(abort+0xf4) [0xffffac23b50c]
/usr/sbin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0x26c) [0xaaaacedb993c]
/usr/sbin/mysqld(fil_tablespace_redo_extend(unsigned char*, unsigned char const*, page_id_t const&, unsigned long, bool)+0x4a8) [0xaaaaceeedd68]
/usr/sbin/mysqld(+0x1e79ba0) [0xaaaacec9aba0]
/usr/sbin/mysqld(+0x1e7aa44) [0xaaaacec9ba44]
/usr/sbin/mysqld(+0x1e7f670) [0xaaaaceca0670]
/usr/sbin/mysqld(recv_recovery_from_checkpoint_start(log_t&, unsigned long)+0x580) [0xaaaaceca1570]
/usr/sbin/mysqld(srv_start(bool)+0x1e68) [0xaaaaced6f7c8]
/usr/sbin/mysqld(+0x1dc8154) [0xaaaacebe9154]
/usr/sbin/mysqld(dd::bootstrap::DDSE_dict_init(THD*, dict_init_mode_t, unsigned int)+0x6c) [0xaaaace9205fc]
/usr/sbin/mysqld(dd::upgrade_57::do_pre_checks_and_initialize_dd(THD*)+0x164) [0xaaaacead8224]
/usr/sbin/mysqld(+0xf9d874) [0xaaaacddbe874]
/usr/sbin/mysqld(+0x21b9d84) [0xaaaacefdad84]
/lib/aarch64-linux-gnu/libpthread.so.0(+0x7f74) [0xffffac64ff74]
/lib/aarch64-linux-gnu/libc.so.6(+0xd73dc) [0xffffac2ee3dc]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): is an invalid pointer
Connection ID (thread ID): 1
Status: NOT_KILLED
sudo service mysql status
systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
systemd[1]: Stopped MySQL Community Server.
systemd[1]: mysql.service: Start request repeated too quickly.
systemd[1]: mysql.service: Failed with result 'exit-code'.
systemd[1]: Failed to start MySQL Community Server.
這是目錄權限問題,請確保您的目錄歸 mysql 所有,權限設置為 drwxr-x---,您可以通過
chown mysql:mysql "data-dir"
chmod 760 "data-dir"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.