I am facing this weird issue. Suddenly mysql stops working and i am getting error log in /var/log/mysql/error.log
**
140501 17:21:09 [Note] Plugin 'FEDERATED' is disabled.
140501 17:21:09 InnoDB: The InnoDB memory heap is disabled
140501 17:21:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140501 17:21:09 InnoDB: Compressed tables use zlib 1.2.3.4
140501 17:21:10 InnoDB: Initializing buffer pool, size = 128.0M
140501 17:21:10 InnoDB: Completed initialization of buffer pool
140501 17:21:10 InnoDB: highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/error-creating-innodb.html
140501 17:21:10 [ERROR] Plugin 'InnoDB' init function returned error.
140501 17:21:10 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140501 17:21:10 [ERROR] Unknown/unsupported storage engine: InnoDB
140501 17:21:10 [ERROR] Aborting
140501 17:21:10 [Note] /usr/sbin/mysqld: Shutdown complete
**
Its very itching problem as I can write a single code without myqsl connection. How to solve this issue.
PS: Sorry Ubuntu fellas as I am using 13.04 unsupported version, I have already installed 14.04 and will move to it in a couple of days.
After going through lots of suggestions I found in stackoverflow and other mysql related websites, I did not success to fix this issue. then I reconfigure my mysql installations and voila its working now.
Command I used is
sudo dpkg-reconfigure mysql-server-5.5
Related
I am trying to run MySql on my Virtual Machine. However, I encountered the following error and thus MySql cannot start up. I am new to MySql. Your help is really appreciated! Here is the message from the error log:
[Note] Plugin 'FEDERATED' is disabled.
/opt/mysql/mysql/sbin/mysqld: Table 'mysql.plugin' doesn't exist
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
[Note] InnoDB: Using atomics 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: Memory barrier is not used
[Note] InnoDB: Compressed tables use zlib 1.2.3
[Note] InnoDB: Using Linux native AIO
[Note] InnoDB: Using CPU crc32 instructions
[Note] InnoDB: Initializing buffer pool, size = 128.0M
[Note] InnoDB: Completed initialization of buffer pool
[Note] InnoDB: Restoring page 0 of tablespace 0
[Warning] InnoDB: Doublewrite does not have page_no=0 of space: 0
[ERROR] InnoDB: space header page consists of zero bytes in data file ./ibdata1
[ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting
/opt/mysql/mysql/sbin/mysqld: Table 'mysql.plugin' doesn't exist
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
IF you read in carefully, first line enlightens the problem and the second line advises solution for it.
run mysql_upgrade to fix it.
Seems, you didn't set path of your ibdata1 or you removed ibdata1 file. Please check my.cnf and set below parameter in my.cnf.
innodb_data_home_dir (path of innodb)
innodb_data_file_path (for example: ibdata1:10M:autoextend)
Note: If it's new setup then also enable innodb_file_per_table
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.
Not sure if this will work but since the server doesn't work anyway so try this out:
Rename logfile0 and logfile1 and then restart the server.
Before doing anything, make a copy of the entire mysql folder to another location just in case.
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.
I'm having problems with MariaDB, while it was first working fine. I only restarted the server, when I couldn't start the MySQL daemon anymore. It seems to still be using my old USB-stick's file path (/media/brood), while I already switched over to a new HDD instead (/media/seagate). This is the error I'm getting in /var/log/mysql/error.log:
160728 9:32:32 [ERROR] mysqld: Can't lock aria control file '/media/brood/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds
160728 9:33:03 [ERROR] mysqld: Got error 'Could not get an exclusive lock; file is probably in use by another process' when trying to use aria control file '/media/brood/mysql/aria_log_control'
160728 9:33:03 [ERROR] Plugin 'Aria' init function returned error.
160728 9:33:03 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
160728 9:33:03 [Note] InnoDB: Using mutexes to ref count buffer pool pages
160728 9:33:03 [Note] InnoDB: The InnoDB memory heap is disabled
160728 9:33:03 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
160728 9:33:03 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
160728 9:33:03 [Note] InnoDB: Compressed tables use zlib 1.2.8
160728 9:33:03 [Note] InnoDB: Using Linux native AIO
160728 9:33:03 [Note] InnoDB: Not using CPU crc32 instructions
160728 9:33:03 [Note] InnoDB: Initializing buffer pool, size = 128.0M
160728 9:33:03 [Note] InnoDB: Completed initialization of buffer pool
160728 9:33:03 [ERROR] InnoDB: Unable to lock ./ib_logfile0, error: 11
160728 9:33:03 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
160728 9:33:03 [ERROR] InnoDB: Unable to open './ib_logfile0'
160728 9:33:03 [ERROR] Plugin 'InnoDB' init function returned error.
160728 9:33:03 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160728 9:33:03 [Note] Plugin 'FEEDBACK' is disabled.
mysqld: Too many arguments (first extra is 'stop').
160728 9:33:03 [ERROR] Aborting
160728 9:33:03 [Note] mysqld: Shutdown complete
It could also be permission issues, or maybe files are still locked (I don't know how that works), because the last time the Raspberry Pi restarted, it was because someone accidentally pulled out the power plug of the Pi.
Why the log contained the path to the old mysql data folder is still a mystery to me. (It's not even the previous USB-stick, to make the story more complete, it's actually the USB-stick I used before that!) But, the problem is solved! The answer was actually much simpler than I thought, it turns out, my brother uninstalled something (an emulator for playing old games, he said), when he noticed it uninstalled mariadb-server-10.0 (strange!). So I did a simple sudo apt-get install mariadb-server-10.0, and guess what! It solved my problem! :D
I have installed mysql server on ec2 AMI. Suddenly stopped working mysql server and its not getting started.
Here is mysql log :
160629 4:28:37 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.46) starting as process 3059 ...
160629 4:28:37 [Note] Plugin 'FEDERATED' is disabled.
160629 4:28:37 InnoDB: The InnoDB memory heap is disabled
160629 4:28:37 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160629 4:28:37 InnoDB: Compressed tables use zlib 1.2.8
160629 4:28:37 InnoDB: Using Linux native AIO
160629 4:28:37 InnoDB: Initializing buffer pool, size = 512.0M
160629 4:28:37 InnoDB: Completed initialization of buffer pool
160629 4:28:37 InnoDB: highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/error-creating-innodb.html
160629 4:28:37 [ERROR] Plugin 'InnoDB' init function returned error.
160629 4:28:37 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160629 4:28:37 [ERROR] Unknown/unsupported storage engine: InnoDB
160629 4:28:37 [ERROR] Aborting
160629 4:28:37 [Note] /usr/libexec/mysql55/mysqld: Shutdown complete
160629 04:28:37 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
Here are approach what I have tried yet:
1) Upgraded EC2 t2.micro to t2.medium.
2) Increased innodb_buffer_pool_size in my.cnf
3) Rename ib_logfile0 and ib_logfile1
Please suggest what next step should I do to start mysql.
Edit:
Sudo free -m
total used free shared buffers cached
Mem: 3954 149 3805 0 9 86
-/+ buffers/cache: 53 3901
Edit:
Is there only solution to uninstall mysql and re-install ?
If yes, then how can retain already created databases in mysql? Please Suggest.
Please go through the below link which is being given in your error logs.
It has mentioned certain steps to solve runtime exception .You can cross check and proceed. If nothing helped than you can opt for uninstallation.
http://dev.mysql.com/doc/refman/5.5/en/error-creating-innodb.html
I've been running a new server instance fine for the past two weeks. Starting today, mysql stoped working by itself, and here is the logs I'm getting.
130922 13:32:39 [Note] Plugin 'FEDERATED' is disabled.
130922 13:32:39 InnoDB: The InnoDB memory heap is disabled
130922 13:32:39 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130922 13:32:39 InnoDB: Compressed tables use zlib 1.2.3.4
130922 13:32:39 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(135987200 bytes) failed; errno 12
130922 13:32:39 InnoDB: Completed initialization of buffer pool
130922 13:32:39 InnoDB: Fatal error: cannot allocate memory for the buffer pool
130922 13:32:39 [ERROR] Plugin 'InnoDB' init function returned error.
130922 13:32:39 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
130922 13:32:39 [ERROR] Unknown/unsupported storage engine: InnoDB
130922 13:32:39 [ERROR] Aborting
130922 13:32:39 [Note] /usr/sbin/mysqld: Shutdown complete
From what I'm looking at, it seems that there is a problem allocating memory to the databases (there are only a wordpress installed on this machine)... Although, Googling around gives me multiple answers to multiple problem, and I'm not quite sure what do do now.
Right now, the only way to solve the problem is to reboot the machine, then mysql will work again until the next time I see that kind of messages in the log.
Should I try to find a way to change anything in my.cnf for memory? Or is there any other avenue that you could suggest?
In the end, I moved the server over new specs with higher memory and it seems it did the trick, as #Bill-Karwin suggested.