Error in MySQL Xampp - mysql

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...

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 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 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 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)-- MYSQL Command line connectivity

I am trying to run MYSQL Server from command line and I am getting the above error on executing mysql -u root -p command. I tried to rectify the issue following the below mentioned logs but the same error comes again.
LOG DATA:
C:\Program Files\MySQL\MySQL Server 5.5\bin>mysqld -nt --standalone --console
150615 0:30:10 [Warning] option 'new': boolean value 't' wasn't recognized. Set
to OFF.
150615 0:30:10 [Note] mysqld (mysqld 5.5.44) starting as process 3768 ...
150615 0:30:10 [Note] Plugin 'FEDERATED' is disabled.
150615 0:30:10 InnoDB: The InnoDB memory heap is disabled
150615 0:30:10 InnoDB: Mutexes and rw_locks use Windows interlocked functions
150615 0:30:10 InnoDB: Compressed tables use zlib 1.2.3
150615 0:30:10 InnoDB: Initializing buffer pool, size = 675.0M
150615 0:30:10 InnoDB: Completed initialization of buffer pool
InnoDB: Error: space header page consists of zero bytes in data file C:\MySQL Da
tafiles\ibdata1
150615 0:30:10 InnoDB: Could not open or create data files.
150615 0:30:10 InnoDB: If you tried to add new data files, and it failed here,
150615 0:30:10 InnoDB: you should now edit innodb_data_file_path in my.cnf back
150615 0:30:10 InnoDB: to what it was, and remove the new ibdata files InnoDB c
reated
150615 0:30:10 InnoDB: in this failed attempt. InnoDB only wrote those files fu
ll of
150615 0:30:10 InnoDB: zeros, but did not yet use them in any way. But be caref
ul: do not
150615 0:30:10 InnoDB: remove old data files which contain your precious data!
150615 0:30:10 [ERROR] Plugin 'InnoDB' init function returned error.
150615 0:30:10 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
150615 0:30:10 [ERROR] Unknown/unsupported storage engine: INNODB
150615 0:30:10 [ERROR] Aborting
150615 0:30:10 [Note] mysqld: Shutdown complete
150615 0:30:10 InnoDB: Could not open or create data files.
Run mysqld as admin user. You can use windows command runas to run from console as admin.

MySQL service wont start on XAMPP

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.