Reputation: 3352
When attempting to start the mysql server, it returns with exit code 1. I've done this a million times before on this server. Without messing with the server in the past month, mysql has suddenly stopped and I can not start it. My error.log:
[Note] InnoDB: Using mutexes to ref count buffer pool pages
[Note] InnoDB: The InnoDB memory heap is disabled
[Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
[Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
[Note] InnoDB: Compressed tables use zlib 1.2.8
[Note] InnoDB: Using Linux native AIO
[Note] InnoDB: Using SSE crc32 instructions
[Note] InnoDB: Initializing buffer pool, size = 128.0M
[Note] InnoDB: Completed initialization of buffer pool
[Note] InnoDB: Highest supported file format is Barracuda.
[Note] InnoDB: Starting crash recovery from checkpoint LSN=591771482442
Everything goes to ruin below this line.
[Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
InnoDB: Set innodb_force_recovery to ignore this error.
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting
Until I can start mysql-server, I can not run mysqldump
nor mysql -u root
:
Got error: 2002: "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")" when trying to connect
I'm running mariadb-server 10.1.23-9-deb9u1.
Upvotes: 0
Views: 4603
Reputation: 3352
The answer was right infront of me:
InnoDB: Set innodb_force_recovery to ignore this error.
I set innodb_force_recovery = 1
after the [mysqld] clause in my /etc/mysql/mariadb.conf.d/50-server.cnf
(This file may very depending on your OS).
I restarted it and it repaired itself. I later took out the innodb_force_recovery = 1
and restarted again, it then worked just fine.
What did I learn? Have more faith in "auto-repair" procedures. My expectations were so low for them because of my exposure to Microsoft Windows.
Upvotes: 1
Reputation: 2516
Not sure if this will work but since the server doesn't work anyway so try this out:
Rename
logfile0
andlogfile1
and then restart the server.
Before doing anything, make a copy of the entire mysql folder to another location just in case.
Upvotes: 1