Windows 10 Enterprise - MYSQL shutdown unexpectedly - mysql

I've installed Windows 10 Enterprise 64bit on machine and attempting to install Apache, PHP and MySQL on my machine to use for web development. In short I keep running into an error "MySQL shutdown unexpectedly". I've attempted to install using WAMP and XAMPP on my machine and still run into the same error. Apache connects and works on both WAMP and XAMPP however I get the same MySQL error.
So far from all the research I've done please find a synopsis of my situation and the solutions I've tried. I'm thinking this is to do with Windows 10. Also as a side note I'm using bootcamp on my MacBook 12 inch so not sure if this adding to the problem but I would not have thought so.
Apache running on port 80:433 for both XAMPP and WAMP
WAMP - Mysql -> service, start/resume service is green. When I click on it nothing happens. XAMP I get:
8:50:59 AM [mysql] Error: MySQL shutdown unexpectedly.
8:50:59 AM [mysql] This may be due to a blocked port, missing dependencies,
8:50:59 AM [mysql] improper privileges, a crash, or a shutdown by another method.
8:50:59 AM [mysql] Press the Logs button to view error logs and check
8:50:59 AM [mysql] the Windows Event Viewer for more clues
8:50:59 AM [mysql] If you need more help, copy and post this
8:50:59 AM [mysql] entire log window on the forums
Turned off windows firewall, same errors
4.I've checked for skype but it is actually not installed on my machine.Also checked control panel -> view local services, skype is not there nor running Tried netstat-b in the command prompt and I can't see anything with port 80. Also tried netstat -aon | findstr :80, only TCP 192.168.0.10:49556 23.205.116.42:80 ESTABLISHED 1884. Note: If the port was an issue Apache should not be working
I checked the control panel -> view local services there is no World Wide Web Publishing Service.
Followed solution in Xamp-Mysql Shutdown which included deleting ib_logfile1, ib_logfile and ibdata1. As well as appending my.ini with innodb_force_recovery = 1. I get a slightly different error which I put below.
I'm pretty much out of options and about to give into the fact that MySQL may not work on my windows 10 machine. But before I do any help would be appreciated.
Error Logs:
2015-08-08 08:31:08 7024 [Note] Plugin 'FEDERATED' is disabled.
2015-08-08 08:31:08 18ec InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2015-08-08 08:31:08 7024 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-08-08 08:31:08 7024 [Note] InnoDB: The InnoDB memory heap is disabled
2015-08-08 08:31:08 7024 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-08-08 08:31:08 7024 [Note] InnoDB: Memory barrier is not used
2015-08-08 08:31:08 7024 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-08-08 08:31:08 7024 [Note] InnoDB: Not using CPU crc32 instructions
2015-08-08 08:31:08 7024 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-08-08 08:31:08 7024 [Note] InnoDB: Completed initialization of buffer pool
2015-08-08 08:31:08 7024 [Note] InnoDB: Highest supported file format is Barracuda.
2015-08-08 08:31:08 18ec InnoDB: Operating system error number 87 in a file operation.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
2015-08-08 08:31:08 7024 [ERROR] InnoDB: File C:\wamp\mysql\data\ib_logfile0: 'aio read' returned
Error Log # innodb_force_recovery = 1
2015-08-08 09:32:05 3804 [Note] Plugin 'FEDERATED' is disabled.
2015-08-08 09:32:05 1bf8 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2015-08-08 09:32:05 3804 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-08-08 09:32:05 3804 [Note] InnoDB: The InnoDB memory heap is disabled
2015-08-08 09:32:05 3804 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-08-08 09:32:05 3804 [Note] InnoDB: Memory barrier is not used
2015-08-08 09:32:05 3804 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-08-08 09:32:05 3804 [Note] InnoDB: Not using CPU crc32 instructions
2015-08-08 09:32:05 3804 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-08-08 09:32:05 3804 [Note] InnoDB: Completed initialization of buffer pool
2015-08-08 09:32:05 3804 [Note] InnoDB: The first specified data file C:\xampp\mysql\data\ibdata1 did not exist: a new database to be created!
2015-08-08 09:32:05 3804 [Note] InnoDB: Setting file C:\xampp\mysql\data\ibdata1 size to 10 MB
2015-08-08 09:32:05 3804 [Note] InnoDB: Database physically writes the file full: wait...
2015-08-08 09:32:05 3804 [Note] InnoDB: Setting log file C:\xampp\mysql\data\ib_logfile101 size to 5 MB
2015-08-08 09:32:05 3804 [Note] InnoDB: Setting log file C:\xampp\mysql\data\ib_logfile1 size to 5 MB
2015-08-08 09:32:05 1bf8 InnoDB: Operating system error number 87 in a file operation.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
2015-08-08 09:32:05 3804 [ERROR] InnoDB: File C:\xampp\mysql\data\ib_logfile101: 'aio write' returned OS error 187. Cannot continue operation

This solution worked for me.
Uninstall XAMPP and WAMP
Installed WAMP 64bit
Added the following line to my.ini
innodb_flush_method=normal
Closed WAMP and restarted. Logo W is green and working.
Thank you to: Error 187

Related

Error: MySQL shutdown unexpectedly - XAMPP

I have trouble running mysql using xampp on a win10 machine.
Here is the xampp message:
Error: MySQL shutdown unexpectedly.
1:33:01 [mysql] This may be due to a blocked port, missing dependencies,
1:33:01 [mysql] improper privileges, a crash, or a shutdown by another method.
1:33:01 [mysql] Press the Logs button to view error logs and check
1:33:01 [mysql] the Windows Event Viewer for more clues
1:33:01 [mysql] If you need more help, copy and post this
1:33:01 [mysql] entire log window on the forums
And this is my mysql.log:
017-10-18 03:52:49 efc InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2017-10-18 3:52:49 3836 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
2017-10-18 3:52:49 3836 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2017-10-18 3:52:49 3836 [Note] InnoDB: The InnoDB memory heap is disabled
2017-10-18 3:52:49 3836 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2017-10-18 3:52:49 3836 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2017-10-18 3:52:49 3836 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-10-18 3:52:49 3836 [Note] InnoDB: Using generic crc32 instructions
2017-10-18 3:52:49 3836 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2017-10-18 3:52:49 3836 [Note] InnoDB: Completed initialization of buffer pool
2017-10-18 3:52:49 3836 [Note] InnoDB: Restoring page 0 of tablespace 0
2017-10-18 3:52:49 3836 [Warning] InnoDB: Doublewrite does not have page_no=0 of space: 0
2017-10-18 3:52:49 3836 [ERROR] InnoDB: space header page consists of zero bytes in data file C:\xampp\mysql\data\ibdata1
2017-10-18 3:52:49 3836 [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!
2017-10-18 3:52:49 3836 [ERROR] Plugin 'InnoDB' init function returned error.
2017-10-18 3:52:49 3836 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-10-18 3:52:49 3836 [Note] Plugin 'FEEDBACK' is disabled.
2017-10-18 3:52:49 3836 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-10-18 3:52:49 3836 [ERROR] Aborting
I have tried reinitilizing mysql data folder, deleting ibdata1, ib_log files from it, without any success.
Any suggestions are much appreciated.
Solved by Install 5.6.35 / PHP 5.6.35 - XAMPP
Have same issue by using windows 10, xampp 7.2.2.
took backup of htdocs projects
uninstalled XAMPP 7.2.x
installed XAMPP 5.6.x
pasted backup projects to htdocs
got Apache port number issue, then change 80 to 8080 in httpd.conf
works fine !
XAMPP MySQL is not running
Solution->
1.Open cmd and type 'services.msc'
2.Service panel will be opened within 5 seconds
3.Now search for anyother sql server which is still running
4.Select all the sql servers and stop them one by one service(There could be more than one)
5.Finally refresh your computer and start MySQL
6.Enjoy
Hope it will run successfully now :=)

XAMPP error with running MySQL

I have problem witch XAMPP. When I try to run MySQL, XAMPP shows this:
12:37:02 [mysql] Error: MySQL shutdown unexpectedly.
12:37:02 [mysql] This may be due to a blocked port, missing dependencies,
12:37:02 [mysql] improper privileges, a crash, or a shutdown by another method.
12:37:02 [mysql] Press the Logs button to view error logs and check
12:37:02 [mysql] the Windows Event Viewer for more clues
12:37:02 [mysql] If you need more help, copy and post this
12:37:02 [mysql] entire log window on the forums
I've changed ports to 3307 in
C:\xampp\mysql\bin\my.ini
and in C:\xampp\php\php.ini to mysql.default_port=3307
mysqli.default_port=3307.
I've also deleted ib_logfile1 in C:\xampp\mysql\data
, but it still doesn't work.
Error logs:
2017-08-17 12:27:00 2050 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2017-08-17 12:27:00 8272 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB. `
2017-08-17 12:27:00 8272 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2017-08-17 12:27:00 8272 [Note] InnoDB: The InnoDB memory heap is disabled
2017-08-17 12:27:00 8272 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2017-08-17 12:27:00 8272 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2017-08-17 12:27:00 8272 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-08-17 12:27:00 8272 [Note] InnoDB: Using generic crc32 instructions
2017-08-17 12:27:00 8272 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2017-08-17 12:27:00 8272 [Note] InnoDB: Completed initialization of buffer pool
2017-08-17 12:27:00 8272 [Note] InnoDB: The first specified data file C:\xampp\mysql\data\ibdata1 did not exist: a new database to be created!
2017-08-17 12:27:00 8272 [Note] InnoDB: Setting file C:\xampp\mysql\data\ibdata1 size to 10 MB
2017-08-17 12:27:00 8272 [ERROR] InnoDB: Cannot create C:\xampp\mysql\data\ib_logfile101
2017-08-17 12:27:00 8272 [ERROR] Plugin 'InnoDB' init function returned error.
2017-08-17 12:27:00 8272 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-08-17 12:27:00 8272 [Note] Plugin 'FEEDBACK' is disabled.
2017-08-17 12:27:00 8272 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-08-17 12:27:00 8272 [ERROR] Aborting
Any help is appreciated. Thanks
MySQL is telling you exactly why it cannot start:
[ERROR] InnoDB: Cannot create C:\xampp\mysql\data\ib_logfile101
Hence I suggest the first thing you do is to check that c:\xampp\mysql\data exists and is writeable by the DBMS user.
First stop the service on the xampp control panel,
then click on the red cross on the left to install the service on your computer,
then the icon will become a green tick,
then start the service as administrator.
It should be working alright.
Open the XAMPP control panel and stop the actions.
Open services and go to MySql80.
Stop the service.
Start the service.

MySQL has broke, can not be started: "Restoring possible half-written data pages from the doublewrite buffer..."

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.

XAMPP MySQL won't start error 1217

I recently got a virus in my computer, and had to reinstall windows. Luckily I have everything on separate HDDs, so I thought it was just to reformat and start XAMPP again. But apparently it wasn't that easy, I keep getting this error message when I try to start MySQL
2014-04-18 10:26:35 3200 [Note] Plugin 'FEDERATED' is disabled.
2014-04-18 10:26:35 bb4 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2014-04-18 10:26:35 3200 [Note] InnoDB: The InnoDB memory heap is disabled
2014-04-18 10:26:35 3200 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2014-04-18 10:26:35 3200 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-04-18 10:26:35 3200 [Note] InnoDB: Not using CPU crc32 instructions
2014-04-18 10:26:35 3200 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2014-04-18 10:26:35 3200 [Note] InnoDB: Completed initialization of buffer pool
2014-04-18 10:26:43 3200 [Note] InnoDB: Highest supported file format is Barracuda.
2014-04-18 10:26:45 bb4 InnoDB: Operating system error number 1117 in a file operation.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
2014-04-18 10:26:45 3200 [ERROR] InnoDB: File D:\xampp\mysql\data\ib_logfile0: 'Windows aio' returned OS error 1217. Cannot continue operation
What can i do to fix it? I don't want to lose the data I have in my MySQL server.
please test this method,copy mysql/data/ibdata1 to another place, if windows couldnt copy that file, this means file crashed with Unwanted windows shutdown.so ibdata1 i/o error Happened. you simlpy must run windows drive error checking on xampp drive. windows automaticaly recover your ibdata1 file.

Innodb: Operating system error number 1117 in a file operation

i installed apache and mysql 5.5 on windows 7 64 bit. it worked but today mysql can not start and windows give me this error "Can't start MySQL Error 1067" when i try to start mysql manually.
.
i see this lines in error log :
120616 16:35:47 [Note] Plugin 'FEDERATED' is disabled.
120616 16:35:48 InnoDB: The InnoDB memory heap is disabled
120616 16:35:48 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120616 16:35:48 InnoDB: Compressed tables use zlib 1.2.3
120616 16:35:48 InnoDB: Initializing buffer pool, size = 103.0M
120616 16:35:48 InnoDB: Completed initialization of buffer pool
120616 16:35:48 InnoDB: highest supported file format is Barracuda.
120616 16:35:50 InnoDB: **Operating system error number 1117 in a file operation.**
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
InnoDB: File name .\ib_logfile0
InnoDB: File operation call: 'Windows aio'.
InnoDB: Cannot continue operation.
what is problem and InnoDB: Operating system error number 1117 in a file operation.
?
what can i do?
i find this link. i removed the ib_logfile0 or ib_logfile1 in the data folder and it works.