MariaDB SQL在更新后将不会运行

我尝试了一堆不同的东西,但不pipe我做了什么,当我运行sudo mysqld时,我总是收到这个错误:

 2016-12-20 16:52:42 139941442312128 [Note] mysqld (mysqld 10.1.20-MariaDB-1~trusty) starting as process 1433 ... 2016-12-20 16:52:42 139941442312128 [ERROR] mysqld: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: Using mutexes to ref count buffer pool pages 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: The InnoDB memory heap is disabled 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: Compressed tables use zlib 1.2.8 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: Using Linux native AIO 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: Using SSE crc32 instructions 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: Initializing buffer pool, size = 256.0M 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: Completed initialization of buffer pool 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: Highest supported file format is Barracuda. 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: The log sequence numbers 17659355129 and 17659355129 in ibdata files do not match the log sequence number 17659395526 in the ib_logfiles! 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: Database was not shutdown normally! 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: Starting crash recovery. 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: Reading tablespace information from the .ibd files... 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: Restoring possible half-written data pages 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: from the doublewrite buffer... 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: 128 rollback segment(s) are active. 2016-12-20 16:52:45 139941442312128 [Note] InnoDB: Waiting for purge to start 161220 16:52:45 [ERROR] mysqld got signal 11 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. To report this bug, see https://mariadb.com/kb/en/reporting-bugs We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. Server version: 10.1.20-MariaDB-1~trusty key_buffer_size=134217728 read_buffer_size=2097152 max_used_connections=0 max_threads=102 thread_count=0 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 759834 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x0x0 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 = 0x0 thread_stack 0x48400 addr2line: 'mysqld': No such file mysqld(my_print_stacktrace+0x2e)[0x7f46a7879c2e] mysqld(handle_fatal_signal+0x305)[0x7f46a739ca95] /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7f46a58ed330] mysqld(+0x8f3ac8)[0x7f46a76daac8] mysqld(+0x8c2ba7)[0x7f46a76a9ba7] mysqld(+0x888529)[0x7f46a766f529] mysqld(+0x8f0f5e)[0x7f46a76d7f5e] mysqld(+0x8dedd6)[0x7f46a76c5dd6] /lib/x86_64-linux-gnu/libpthread.so.0(+0x8184)[0x7f46a58e5184] /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f46a4e0437d] The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash. 

如果我运行sudo service mysql restart时,MySQL停止,它返回以下内容:

 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111 "Connection refused") 

任何信息都是有帮助的。 我不确定哪里出了问题。 我也无法访问mysql错误日志。 即使sudo也被拒绝。

正如@Michael Hamption所说,确保MySQL不是全部运行。 只需运行ps -ef|grep mysql[d]或者service mysqld status来查看它是否仍在运行。

尝试使用以下命令之一来停止它:

  • 服务mysql停止
  • mysqladmin关机
  • pkill mysql [d]

如果您确定MySQL服务没有运行,请启动它,然后再次检查日志。