I have tried a bunch of different things, but no matter what I do, I keep getting this error when I run 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
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
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.

If I run sudo service mysql restart when MySQL is stopped, it returns the following:

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

Any information at all would be helpful. I'm not sure what went wrong. I also can't access the mysql error logs. I get permission denied even with sudo.

  • What group is /var/lib/mysql/aria_log_control owned by? – Hydra IO Dec 21 '16 at 1:09
  • 2
    STOP doing anything. You are probably corrupting your data worse. It appears that mysqld is already running. You need to be 100% certain that it is not running before attempting to start it again or run any sort of recovery operation. If you are not 100% certain that it is not running, restart the computer to be sure. – Michael Hampton Dec 21 '16 at 1:38
  • @HydraIO The ownership of /var/lib/mysql/aria_log_control is mysql:mysql – Confused One Dec 21 '16 at 17:20
  • @MichaelHampton I am certain it's stopped now. I've never had something like this happen though. What should be my next step? – Confused One Dec 21 '16 at 17:22
  • Alright, it's stopped. Good. Can you roll that update back and re-run this update in a test environment (if this isn't one already)? Your problem looks to be with the Aria log. You'll probably find that deleting it and then restarting mariadb will fix this. However, I can't recommend that you do anything other than attempt to roll back if this is only in production. – Spooler Dec 21 '16 at 23:40

As @Michael Hamption said, make sure that MySQL is not allready runing. Just run ps -ef|grep mysql[d] or service mysqld status to see if it is still running.

Try to stop it with one of those commands:

  • service mysql stop
  • mysqladmin shutdown
  • pkill mysql[d]

When you are sure MySQL service is not running, start it, and check the logs again.

  • service mysqld status returns mysqld: unrecognized service, but service mysql status returns * MariaDB is stopped. – Confused One Dec 21 '16 at 17:18
  • And what is the output of ps? – 2ps Jan 1 '17 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.