XAMPP MySQL suddenly doesnt work anymore - mysql

It was working fine for month. But today i wanna start working and cant connect to MySQL anymore.
Im using XAMPP 1.7.7 on Windows 7
XAMPP Control Panel says MySQL is "Running" and shows "Mysql started [Port 3306]"
But when i go to localhost and click status, it shows "MySQL database Deactivated"
When i go to phpmyadmin it shows: "2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)"
Also mysql_error.log file at C:\xampp\mysql\data shows no errors?
140312 15:02:24 [Note] Plugin 'FEDERATED' is disabled.
140312 15:02:24 InnoDB: The InnoDB memory heap is disabled
140312 15:02:24 InnoDB: Mutexes and rw_locks use Windows interlocked functions
140312 15:02:24 InnoDB: Compressed tables use zlib 1.2.3
140312 15:02:24 InnoDB: Initializing buffer pool, size = 16.0M
140312 15:02:24 InnoDB: Completed initialization of buffer pool
140312 15:02:24 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
140312 15:02:24 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
140312 15:02:24 InnoDB: Waiting for the background threads to start
140312 15:02:25 InnoDB: 1.1.8 started; log sequence number 3612444192
140312 15:02:25 [Note] Event Scheduler: Loaded 0 events
140312 15:02:25 [Note] mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.16' socket: '' port: 3306 MySQL Community Server (GPL)
Any ideas? :(

The question is old, but I have just had the same issue so I will write my solution.
It could be a problem with Xampp.
Try to uninstall and install again.
But before, you can try also something that worked for me, namely run the file:
C:\xampp\mysql\resetroot.bat

Related

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.

MySQL server crash

I am experiencing regular MySQL server crashes (on Linux). After running
sudo /etc/init.d/mysql restart
the problem goes away, but temporary. It might be one day or couple, but the crash will happen anyway. Here's an excerpt from the error log file, after the crash and before the daemon restart. I am not sure it reflects any useful information though.
140511 0:11:06 [Note] Plugin 'FEDERATED' is disabled.
140511 0:11:37 InnoDB: Initializing buffer pool, size = 8.0M
140511 0:11:38 InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
140511 0:11:52 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
140511 0:14:26 InnoDB: Started; log sequence number 1 3968482280
140511 0:16:46 [Note] Event Scheduler: Loaded 0 events
140511 0:16:46 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.69-0ubuntu0.11.10.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
140511 0:22:00 [Note] Plugin 'FEDERATED' is disabled.
140511 0:22:46 InnoDB: Initializing buffer pool, size = 8.0M
140511 0:22:46 InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
140511 0:22:52 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
140511 0:24:41 InnoDB: Started; log sequence number 1 3968482290
140511 0:26:55 [Note] Event Scheduler: Loaded 0 events
140511 0:26:56 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.69-0ubuntu0.11.10.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
The problem did not disappear after reinstalling the server.
Perhaps it's time to install the database on clean OS install, and bring all my databases there, but before such time-consuming solution I'd like to try some less-involving ones, if there are any.

MySQL service hung in "Starting" mode

I am trying to install multiple instances of MySQL on a Windows Server 2003 using this link.
First instance which is on port 6699 get configured and working successfully. But when I try to install another instance on default port (3306) MySQL service gets hung on "Starting" status. This is the log
140210 17:13:20 [Note] Plugin 'FEDERATED' is disabled.
140210 17:13:20 InnoDB: The InnoDB memory heap is disabled
140210 17:13:20 InnoDB: Mutexes and rw_locks use Windows interlocked functions
140210 17:13:20 InnoDB: Compressed tables use zlib 1.2.3
140210 17:13:20 InnoDB: Initializing buffer pool, size = 128.0M
140210 17:13:20 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
140210 17:13:21 InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
140210 17:13:21 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
140210 17:13:23 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
140210 17:13:26 InnoDB: Waiting for the background threads to start
140210 17:13:27 InnoDB: 1.1.8 started; log sequence number 0
140210 17:13:27 [Note] Server hostname (bind-address): '0.0.0.0'; port: 6699
140210 17:13:27 [Note] - '0.0.0.0' resolves to '0.0.0.0';
140210 17:13:27 [Note] Server socket created on IP: '0.0.0.0'.
140210 17:13:27 [Note] Event Scheduler: Loaded 0 events
140210 17:13:27 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld.exe: ready for connections.
Version: '5.5.25' socket: '' port: 6699 MySQL Community Server (GPL)
140210 17:42:18 [Note] Plugin 'FEDERATED' is disabled.
140210 17:42:18 InnoDB: The InnoDB memory heap is disabled
140210 17:42:18 InnoDB: Mutexes and rw_locks use Windows interlocked functions
140210 17:42:18 InnoDB: Compressed tables use zlib 1.2.3
140210 17:42:19 InnoDB: Initializing buffer pool, size = 128.0M
140210 17:42:19 InnoDB: Completed initialization of buffer pool
140210 17:42:19 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
Observe line 140210 17:42:19 InnoDB: Database was not shut down normally!
InnoDB: The log sequence number in ibdata files does not match
Double check your configuration!
Make a binay backup or entire /var/lib/mysql.
If you don't need most recent data, delete the log files and try to start.
If you need your data, try the followling:
Try innodb_force_recovery = 1 to 6 all six options in an increasing order.
Assume the worst -- innodb disk image corrupted.
If you are lucky you can salvage most of your data, perhaps mysql starts in one of recovery modes, run checksum on each table, see what tables are still ok.
If mysql refuses to start up to certain recovery mode N and crashes on startup with recovery mode N, then go looking for those daily/weekly backups I hope you system was configured to take.

Selecting a table is shutting down my MySQL server (Error 2013)

In my Moodle database, everytime I select the mdl_certificate table, the MySQL server goes down. I thought it could be a problem with the PHPMyAdmin, but I installed the MySQL Workbench and the same still happens.
So I tried the console. The problem persists. I got two prints:
I've never seen this. How can I solve it?
Thanks!
UPDATE:
This is the log around the time the error was showed:
130411 8:51:20 [Note] Plugin 'FEDERATED' is disabled.
130411 8:51:20 InnoDB: The InnoDB memory heap is disabled
130411 8:51:20 InnoDB: Mutexes and rw_locks use Windows interlocked functions
130411 8:51:20 InnoDB: Compressed tables use zlib 1.2.3
130411 8:51:20 InnoDB: Initializing buffer pool, size = 128.0M
130411 8:51:20 InnoDB: Completed initialization of buffer pool
130411 8:51:20 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130411 8:51:20 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
130411 8:51:20 InnoDB: Operating system error number 1392 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 .\prestashopprod
InnoDB: File operation call: 'readdir_next_file'.
InnoDB: Error: os_file_readdir_next_file() returned -1 in
InnoDB: directory .\prestashopprod
InnoDB: Crash recovery may have failed for some .ibd files!
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Last MySQL binlog file position 0 4793, file name .\mysql-bin.000062
130411 8:51:33 InnoDB: Waiting for the background threads to start
130411 8:51:34 InnoDB: 1.1.8 started; log sequence number 795429719
130411 8:51:34 [Note] Recovering after a crash using mysql-bin
130411 8:51:34 [Note] Starting crash recovery...
130411 8:51:34 [Note] Crash recovery finished.
130411 8:51:34 [Note] Event Scheduler: Loaded 0 events
130411 8:51:34 [Note] wampmysqld: ready for connections.
Version: '5.5.20-log' socket: '' port: 3306 MySQL Community Server (GPL)
The solution was drop the tables and re-create them. Luckly, they were empty.

MySQL ...Starting crash recovery

I have searched high and low for a solution to this problem. My MySql gives me the following readout:
121231 20:41:05 [Note] Plugin 'FEDERATED' is disabled.
121231 20:41:05 InnoDB: The InnoDB memory heap is disabled
121231 20:41:05 InnoDB: Mutexes and rw_locks use Windows interlocked functions
121231 20:41:05 InnoDB: Compressed tables use zlib 1.2.3
121231 20:41:05 InnoDB: Initializing buffer pool, size = 512.0M
121231 20:41:05 InnoDB: Completed initialization of buffer pool
121231 20:41:05 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
121231 20:41:05 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
121231 20:41:06 InnoDB: Waiting for the background threads to start
121231 20:41:07 InnoDB: 1.1.8 started; log sequence number 124716458
121231 20:41:07 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
121231 20:41:07 [Note] - '0.0.0.0' resolves to '0.0.0.0';
121231 20:41:07 [Note] Server socket created on IP: '0.0.0.0'.
121231 20:41:09 [Note] Event Scheduler: Loaded 0 events
121231 20:41:09 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.27' socket: '' port: 3306 MySQL Community Server (GPL)
Everytime it starts. I've tried deleting files, dropping the database, running Magento's Repair Database Tool, starting all over with a new database but no matter what I get this error.
It makes me uncomfortable because I'm not sure something might get corrupted or IS corrupted. I'm using Windows Vista, and Xampp but I also was using nginX with the same thing showing.
I just recreated a brand new database and now after shutdown (which I have to do sometimes) the error is showing up again! Is this a normal thing or is there somehing wrong?
Thanks
As you can see from the log InnoDB starts crash recovery:
InnoDB: Starting crash recovery.
The reason for that is MySQL shut down wasn't clean. Why? May be MySQL has been exiting too long and OS kills the process (if you reboot the server). Or MySQL crashes due to a bug.