MySQL service wont start on XAMPP - mysql

I installed MySQL Server 5.6, but soon after I had to install XAMPP.
When I try to start MySQL it just hangs at...
Attempting to start MySQL app...
The errors in the logs are as follows...
140401 15:05:43 [Note] Plugin 'FEDERATED' is disabled.
140401 15:05:43 InnoDB: The InnoDB memory heap is disabled
140401 15:05:43 InnoDB: Mutexes and rw_locks use Windows interlocked functions
140401 15:05:43 InnoDB: Compressed tables use zlib 1.2.3
140401 15:05:43 InnoDB: Initializing buffer pool, size = 16.0M
140401 15:05:43 InnoDB: Completed initialization of buffer pool
InnoDB: Error: space header page consists of zero bytes in data file C:\xampp\mysql\data\ibdata1
140401 15:05:43 InnoDB: Could not open or create data files.
140401 15:05:43 InnoDB: If you tried to add new data files, and it failed here,
140401 15:05:43 InnoDB: you should now edit innodb_data_file_path in my.cnf back
140401 15:05:43 InnoDB: to what it was, and remove the new ibdata files InnoDB created
140401 15:05:43 InnoDB: in this failed attempt. InnoDB only wrote those files full of
140401 15:05:43 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
140401 15:05:43 InnoDB: remove old data files which contain your precious data!
140401 15:05:43 [ERROR] Plugin 'InnoDB' init function returned error.
140401 15:05:43 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140401 15:05:43 [ERROR] Unknown/unsupported storage engine: InnoDB
140401 15:05:43 [ERROR] Aborting
140401 15:05:43 [Note] c:\xampp\mysql\bin\mysqld.exe: Shutdown complete
I tried stopping the MySQL56 service in services, but still it didnt work
I also tried changing ports in my.ini to 3307, but still no luck
I have obviously restarted everything after these changes but it just stays hanging on the attempt to start

Uninstall both and reinstall XAMPP with MySQL included. Many times these installs will run as administrators and then you won't have rights to modify them if it sees you as a different user.
You could also try right clicking on the icon to start XAMPP and choose "Run as Administrator" before uninstall / reinstall and see if that solves it.

Related

Mysql failed to start due to errors from innodb

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

MySql service won't start from recovered ibdata1 file

One of our servers was the subject of a ransomware attack from a group of international Hackers. So we’ve re-grouped and started over and the only unaffected data we had was the ibdata1 file stored in mysql program data folder.
We would like to restore that data on the new instance so that we carry forward our operations but after trying to run the new installation of mysql it the service stops with error 1067. It suggests to delete all files created by InnoDB: all ibdata files and all ib_logfile files. If I do that the service will run but I can’t do it because I need to access the data in this particular data file. I’ve also added these two lines in my .cnf file
innodb_force_recovery=6
innodb_fast_shutdown=0
That hasn’t worked. So I deleted just the log files and it created new log files along with it came this error
190223 11:38:48 [Note] Plugin 'FEDERATED' is disabled.
190223 11:38:48 InnoDB: The InnoDB memory heap is disabled
190223 11:38:48 InnoDB: Mutexes and rw_locks use Windows interlocked functions
190223 11:38:48 InnoDB: Compressed tables use zlib 1.2.3
190223 11:38:48 InnoDB: Initializing buffer pool, size = 2.0G
190223 11:38:48 InnoDB: Completed initialization of buffer pool
190223 11:38:48 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
190223 11:38:48 [ERROR] Plugin 'InnoDB' init function returned error.
190223 11:38:48 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
190223 11:38:48 [ERROR] Unknown/unsupported storage engine: INNODB
190223 11:38:48 [ERROR] Aborting
Then I replaced the log files with the same ones I used with the original ibdata1 file then I got this error.
190223 12:11:26 [Note] Plugin 'FEDERATED' is disabled.
190223 12:11:26 InnoDB: The InnoDB memory heap is disabled
190223 12:11:26 InnoDB: Mutexes and rw_locks use Windows interlocked functions
190223 12:11:26 InnoDB: Compressed tables use zlib 1.2.3
190223 12:11:26 InnoDB: Initializing buffer pool, size = 2.0G
190223 12:11:26 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 1073741824 bytes
InnoDB: than specified in the .cnf file 0 224395264 bytes!
190223 12:11:26 [ERROR] Plugin 'InnoDB' init function returned error.
190223 12:11:26 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
190223 12:11:26 [ERROR] Unknown/unsupported storage engine: INNODB
190223 12:11:26 [ERROR] Aborting
It appears there is a check point somewhere in the log files that is necessary for the data file to be read properly by the mysql service. Maybe I need to specify the log file size in the my.ini config file. But I don’t know how to go about it.
Any help will really come in handy here.
In your my.ini (or my.cnf) file, add (or replace) the following line:
innodb_log_file_size = 1024M
See https://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_log_file_size for details.

XAMPP: MySQL not starting

I was in the middle of developing my site and both apache and mysql were running normally until suddenly, the database failed to connect. I checked my XAMPP control panel and MySQL had stopped running. I searched for a solution here and some other similar questions on SO but i haven't been able to find a solution that works for me. Here is the contents of mysql_error.log file:
2016-04-15 20:30:18 150c 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.
160415 20:30:18 [Note] InnoDB: Using mutexes to ref count buffer pool pages
160415 20:30:18 [Note] InnoDB: The InnoDB memory heap is disabled
160415 20:30:18 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
160415 20:30:18 [Note] InnoDB: Memory barrier is not used
160415 20:30:18 [Note] InnoDB: Compressed tables use zlib 1.2.3
160415 20:30:18 [Note] InnoDB: Not using CPU crc32 instructions
160415 20:30:18 [Note] InnoDB: Initializing buffer pool, size = 16.0M
160415 20:30:18 [Note] InnoDB: Completed initialization of buffer pool
160415 20:30:18 [Note] InnoDB: Restoring page 0 of tablespace 0
160415 20:30:18 [Warning] InnoDB: Doublewrite does not have page_no=0 of space: 0
160415 20:30:18 [ERROR] InnoDB: space header page consists of zero bytes in data file D:\xampp\mysql\data\ibdata1
160415 20:30:18 [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!
160415 20:30:18 [ERROR] Plugin 'InnoDB' init function returned error.
160415 20:30:18 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160415 20:30:18 [Note] Plugin 'FEEDBACK' is disabled.
160415 20:30:18 [ERROR] Unknown/unsupported storage engine: InnoDB
160415 20:30:18 [ERROR] Aborting
160415 20:30:18 [Note] D:\xampp\mysql\bin\mysqld.exe: Shutdown complete
What i have tried until now:
i have changed to port address for from 3306 to 3307, 3310. Didn't work.
i deleted ibdata1 file. Although the file reappeared back in its place after i attempted to restart MySQL. (I learnt later that i would lose my tables if ibdata1 is missing. i don't want that.)
Why did MySQL suddenly run into problems and and how to start MySQL without losing my tables?
There are several reason MySql keeps shutting down unexpectedly.
I am assuming that you have not installed multiple mysql server versions in the same machine.
Stop Mysql service from xampp control panel or stop it manually from services.msc and quit the xampp control panel.
Delete these two log files (ib_logfile0 and ib_logfile1) from xampp/mysql/ directory. (Note: I am not sure about the exact path of log files, check in all the folders of xampp/mysql/ directory)
Restart Mysql service manually from services.msc
open xampp control panel, you should see mysql is running.
I also see your innodb_buffer_pool_size is very low.
Increase the buffer_pool_size to about 50-60% of your RAM. For example, If you have 2GB ram, then set buffer_pool_size= 1GB
run this query in mysql.
set innodb_buffer_pool_size=1073741824;
or
set global innodb_buffer_pool_size=1073741824;
restart mysql server.

Error in MySQL Xampp

I have installed MySQL Workbench on my computer that is using port 3306.
I installed Xampp apache server. When I start the services this error appears:
Problem detected!
Port 3306 in use by ""C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld" --defaults- ile="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini" MySQL56"! MySQL WILL NOT start without the configured ports free!
You need to uninstall/disable/reconfigure the blocking application or reconfigure MySQL and the Control Panel to listen on a different port
I changed the mysql port for xampp in the following way:
Stop the xampp server, if it is already running.
Edit the value to "port" in xampp/mysql/bin/my.ini
Code:
Password = your_password
port = 3306 ---> 3307
socket = "/ xampp / mysql / mysql.sock"
and here also
Code:
The MySQL server
[ mysqld ]
port = 3306 ---> 3307
socket = "/ xampp / mysql / mysql.sock"
And Started mysql service however the error remains.
Does someone can help me solve this please?
thank you all
best regards
----------------------------MySQL_error.log---------------------------
140818 12:09:30 [Note] Plugin 'FEDERATED' is disabled.
140818 12:09:30 InnoDB: The InnoDB memory heap is disabled
140818 12:09:30 InnoDB: Mutexes and rw_locks use Windows interlocked functions
140818 12:09:30 InnoDB: Compressed tables use zlib 1.2.3
140818 12:09:30 InnoDB: Initializing buffer pool, size = 16.0M
140818 12:09:30 InnoDB: Completed initialization of buffer pool
InnoDB: Error: space header page consists of zero bytes in data file C:\xampp\mysql\data\ibdata1
140818 12:09:30 InnoDB: Could not open or create data files.
140818 12:09:30 InnoDB: If you tried to add new data files, and it failed here,
140818 12:09:30 InnoDB: you should now edit innodb_data_file_path in my.cnf back
140818 12:09:30 InnoDB: to what it was, and remove the new ibdata files InnoDB created
140818 12:09:30 InnoDB: in this failed attempt. InnoDB only wrote those files full of
140818 12:09:30 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
140818 12:09:30 InnoDB: remove old data files which contain your precious data!
140818 12:09:30 [ERROR] Plugin 'InnoDB' init function returned error.
140818 12:09:30 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140818 12:09:30 [ERROR] Unknown/unsupported storage engine: InnoDB
140818 12:09:30 [ERROR] Aborting
140818 12:09:30 [Note] c:\xampp\mysql\bin\mysqld.exe: Shutdown complete
140818 12:21:45 [Note] Plugin 'FEDERATED' is disabled.
140818 12:21:45 InnoDB: The InnoDB memory heap is disabled
140818 12:21:45 InnoDB: Mutexes and rw_locks use Windows interlocked functions
140818 12:21:45 InnoDB: Compressed tables use zlib 1.2.3
140818 12:21:45 InnoDB: Initializing buffer pool, size = 16.0M
140818 12:21:45 InnoDB: Completed initialization of buffer pool
InnoDB: Error: space header page consists of zero bytes in data file C:\xampp\mysql\data\ibdata1
140818 12:21:45 InnoDB: Could not open or create data files.
140818 12:21:45 InnoDB: If you tried to add new data files, and it failed here,
140818 12:21:45 InnoDB: you should now edit innodb_data_file_path in my.cnf back
140818 12:21:45 InnoDB: to what it was, and remove the new ibdata files InnoDB created
140818 12:21:45 InnoDB: in this failed attempt. InnoDB only wrote those files full of
140818 12:21:45 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
140818 12:21:45 InnoDB: remove old data files which contain your precious data!
140818 12:21:45 [ERROR] Plugin 'InnoDB' init function returned error.
140818 12:21:45 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140818 12:21:45 [ERROR] Unknown/unsupported storage engine: InnoDB
140818 12:21:45 [ERROR] Aborting
This sounds a lot like you got two MySQL servers running at the same time. I suggest you check your process list for a process called mysqld.exe. (You can also check the "Netstat" as provided by Control Panel) This should be your already running instance of MySQL Server. End that one however you like and try again.
In your case I'd also consider installing the MySQL server as windows-service. This allows you to "externally" manage the server and make sure you only have one instance running.
You can accomplish that by clicking the red x beside the Modulename and wait for it to turn into a green checkmark.
After that your Control Panel should looks something like that ▲▲
I installed both MySQL and Apache as service, but that's your preference ;)
You can then configure your MySQL Workbench to access your already running server instead of starting up its own.
You shouldn't be required to change the port of MySQL in any case.
In addition to that, your Apache Module should be able to launch even without MySQL started...

Mysql stops working in my ubuntu machine 13.04

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