Error: MySQL shutdown unexpectedly xampp 3.2.4 [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
When I open XAMPP (xampp v3.2.4 in windows 10) and click start MySQL button and it gives me an error. I had started it just before, but now it isn't working.
error:
12:50:26 PM [mysql] Status change detected: stopped
12:50:26 PM [mysql] Error: MySQL shutdown unexpectedly.
12:50:26 PM [mysql] This may be due to a blocked port, missing dependencies,
12:50:26 PM [mysql] improper privileges, a crash, or a shutdown by another method.
12:50:26 PM [mysql] Press the Logs button to view error logs and check
12:50:26 PM [mysql] the Windows Event Viewer for more clues
12:50:26 PM [mysql] If you need more help, copy and post this
12:50:26 PM [mysql] entire log window on the forums
so, I check log:
InnoDB: using atomic writes.
2020-08-01 12:50:25 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-08-01 12:50:25 0 [Note] InnoDB: Uses event mutexes
2020-08-01 12:50:25 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-08-01 12:50:25 0 [Note] InnoDB: Number of pools: 1
2020-08-01 12:50:25 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-08-01 12:50:25 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-08-01 12:50:25 0 [Note] InnoDB: Completed initialization of buffer pool
2020-08-01 12:50:25 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-08-01 12:50:25 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-08-01 12:50:25 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-08-01 12:50:25 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2020-08-01 12:50:25 0 [Note] InnoDB: Waiting for purge to start
2020-08-01 12:50:25 0 [Note] InnoDB: 10.4.11 started; log sequence number 51764883; transaction id 105083
2020-08-01 12:50:25 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2020-08-01 12:50:25 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-08-01 12:50:25 0 [Note] Server socket created on IP: '::'.
how do fix this error?

I fixed using this article:
Rename the “data” folder
Rename the “data” folder to “data-oldfiles”.
This is very important to rename the data directory to any new directory name.
Create a new “data” folder
Create a new folder and give the folder name as “data“
To solve the problem we need to create a new “data” directory in the mysql database.
Copy content from “backup” folder
Go to the “backup” folder and copy all files.
Paste the files from backup folder to data folder
Now start the MySQL database from XAMPP.
Now, your MySQL database will start properly without showing any error.
Transfer all MySQL projects Database, Data file & Log files
If you have many database which was used for various projects, then you have to transfer all database from “data-oldfiles” folder to “data” folder.
Copy all databases from the data-old files and paste to the data folder.
Now you have to copy the data file “ibdata1” & all log files “ib_logfile0, ib_logfile1 ” from data-old files folder to the data folder. If you have many id_logiles then copied all of them.

you can end task mysqld.exe or mysqld on task manager. Then run again MySql. It will work. (On Off Engineering).

Related

How to solve "Error: MySQL shutdown unexpectedly" In Xamp?

When I open XAMPP and click start MySQL button and it gives me an error. I had started it just before, but now it isn't working.
It given error below in xammp
Error: MySQL shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums
Here is the contents of the error log:
2022-03-05 11:17:33 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2022-03-05 11:17:33 0 [Note] InnoDB: Uses event mutexes
2022-03-05 11:17:33 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-03-05 11:17:33 0 [Note] InnoDB: Number of pools: 1
2022-03-05 11:17:33 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-03-05 11:17:33 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2022-03-05 11:17:33 0 [Note] InnoDB: Completed initialization of buffer pool
2022-03-05 11:17:36 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2022-03-05 11:17:36 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-03-05 11:17:36 0 [Note] InnoDB: Setting file 'D:\xamp_7.2\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-03-05 11:17:36 0 [Note] InnoDB: File 'D:\xamp_7.2\mysql\data\ibtmp1' size is now 12 MB.
2022-03-05 11:17:36 0 [Note] InnoDB: Waiting for purge to start
2022-03-05 11:17:36 0 [Note] InnoDB: 10.4.13 started; log sequence number 5683247830; transaction id 653050
2022-03-05 11:17:36 0 [Note] InnoDB: Loading buffer pool(s) from D:\xamp_7.2\mysql\data\ib_buffer_pool
2022-03-05 11:17:36 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-03-05 11:17:36 0 [Note] InnoDB: Buffer pool(s) load completed at 220305 11:17:36
2022-03-05 11:17:36 0 [Note] Server socket created on IP: '::'.
What is the cause of these errors and how can I rectify them?
For my, open and empty the file multi-master.info which is at the base of folder data is enough for me.
There are several causes to this problem, and here are some solutions:
Change Your MySQL Port
One of the main causes of this error “MySQL shutdown unexpectedly” is another software using the port assigned to MySQL which is 3306. To verify this you can use netstat module from XAMPP’s control panel, right above the Shell tool. You can fix this problem and prevent it from repeating in the future by simply changing mysql port. To change it, do the following:
Click Confing found at the top right corner
Click Services and Port Settings
Select MySQL then change 3306 to 3307 then click save
On the main xammp screen, Click on mysql's config then select my.ini then search and replace 3306 with the new port number used, in our case 3307 then save
Restart xampp then the problem is solved! But if your problem is not solved, proceed to solution number 2 below
Restore Your Database Backup
Onother reason for this error is corrupted database, to fix it simply restore your database backup which is created automatically by xampp. By default, your XAMPP MySQL backup files should be under Local Disk > XAMPP > MySQL. Inside that directory, you’ll see several folders, two of which are called data and backup. he data folder includes all of the files that your database uses. The backup folder contains a single recent copy of your MySQL. To restore the MySQL backup, change the name of the data folder to anything else, such as data-old. Then rename the backup folder to data. That’s it!
Fix this error with just 2 steps:
Task Manager
Find MySQL -> end task
Go back to XAMPP -> star MySQL, port 3306 should work again.
If you do this it is possible that some DB that you are also using in that port will be deleted, make sure you have a copy before proceeding.
Open data folder and delete all ib_logfile* (ib_logfile0, ib_logfile1).
Then restart xamp, so it solved for me.
Reference:
https://community.apachefriends.org/f/viewtopic.php?t=82071&p=276632

XAMPP - MySQL Shut down Unexpectedly at start in XAMPP control

When I open XAMPP control application and click start MySQL button it won't start and it gives me an error. It starts and after a couple of seconds it shutdowns automatically. the errors from the XAMPP control application is mentioned in below.
12:03:32 PM [mysql] Attempting to start MySQL app...
12:03:32 PM [mysql] Status change detected: running
12:03:34 PM [mysql] Status change detected: stopped
12:03:34 PM [mysql] Error: MySQL shutdown unexpectedly.
12:03:34 PM [mysql] This may be due to a blocked port, missing
dependencies,
12:03:34 PM [mysql] improper privileges, a crash, or a shutdown by
another method.
12:03:34 PM [mysql] Press the Logs button to view error logs and
check
12:03:34 PM [mysql] the Windows Event Viewer for more clues
12:03:34 PM [mysql] If you need more help, copy and post this
12:03:34 PM [mysql] entire log window on the forums
The Following are the errors from my error log
2021-12-21 12:03:32 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2021-12-21 12:03:32 0 [Note] InnoDB: Uses event mutexes
2021-12-21 12:03:32 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-12-21 12:03:32 0 [Note] InnoDB: Number of pools: 1
2021-12-21 12:03:32 0 [Note] InnoDB: Using SSE2 crc32 instructions
2021-12-21 12:03:32 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2021-12-21 12:03:32 0 [Note] InnoDB: Completed initialization of buffer pool
2021-12-21 12:03:32 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=300288
2021-12-21 12:03:32 0 [Warning] InnoDB: Are you sure you are using the right ib_logfiles to start up the database? Log sequence number in the ib_logfiles is 300288, less than the log sequence number in the first system tablespace file header, 300360.
2021-12-21 12:03:32 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-12-21 12:03:32 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2021-12-21 12:03:32 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-12-21 12:03:32 0 [Note] InnoDB: Setting file 'D:\XAMMP\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-12-21 12:03:32 0 [Note] InnoDB: File 'D:\XAMMP\mysql\data\ibtmp1' size is now 12 MB.
2021-12-21 12:03:32 0 [Note] InnoDB: Waiting for purge to start
2021-12-21 12:03:32 0 [Note] InnoDB: 10.4.22 started; log sequence number 300297; transaction id 170
2021-12-21 12:03:32 0 [Note] InnoDB: Loading buffer pool(s) from D:\XAMMP\mysql\data\ib_buffer_pool
2021-12-21 12:03:32 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-12-21 12:03:32 0 [Note] Server socket created on IP: '::'.
2021-12-21 12:03:32 0 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted.
2021-12-21 12:03:32 0 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2021-12-21 12:03:32 0 [ERROR] Aborting
what may cause the problem and how can I resolve them? Thank you in advance
I Got it worked. Didn't change the port and kept it default as 3306. Did the following.
renamed the XAMMP\mysql\data folder to any other name you wish (say data_old )
make a new folder in XAMMP\mysql name data and copy all the files in it including ibdata1
close all running programs and restart XAMPP
No need to copy files from data_old but if you do have previously constructed databases then you may copy some files from data_old.
Special Thanks for everyone who supported.
The easiest way is change port to 3307 or other than 3306 from my.ini and edit "\xamppphp\MyAdmin\config.inc.php"add extra line under
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['port'] = 3308;
if u need explaination I've made Youtube video sE2UkEcth0w
https://www.youtube.com/watch?v=sE2UkEcth0w
seems like following error from the message
Either port is blocked
Or Application doesn't have enough permission to access those port and serve web application.
To fix this
Right click on XAMPP and Click on Run as Administrator
This will prompt you for password or confirmation.
Allow by providing password or permission
This will run XAMPP in highest privilege, so you won't be facing permission issue anymore.
If this works, you can do few more step to avoid running as administrator manually every time.
Right click on XAMPP icon
Go to properties
Look for option > Run as administrator
[*] check the option and save
This will ask for confirmation/password every time when you run XAMPP.
Hope this solves your issue.

XAMPP Control Panel v 3.3.0 - Error: MySQL shutdown unexpectedly

Tried to start my apache server today and MySQL is not running, this is the error that it shows:
10:15:28 AM [mysql] Status change detected: running
10:15:32 AM [mysql] Status change detected: stopped
10:15:32 AM [mysql] Error: MySQL shutdown unexpectedly.
10:15:32 AM [mysql] This may be due to a blocked port, missing dependencies,
10:15:32 AM [mysql] improper privileges, a crash, or a shutdown by another method.
10:15:32 AM [mysql] Press the Logs button to view error logs and check
10:15:32 AM [mysql] the Windows Event Viewer for more clues
10:15:32 AM [mysql] If you need more help, copy and post this
10:15:32 AM [mysql] entire log window on the forums
This is the log error from the xampp control panel:
2021-06-10 10:15:28 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2021-06-10 10:15:28 0 [Note] InnoDB: Uses event mutexes
2021-06-10 10:15:28 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-06-10 10:15:28 0 [Note] InnoDB: Number of pools: 1
2021-06-10 10:15:28 0 [Note] InnoDB: Using SSE2 crc32 instructions
2021-06-10 10:15:28 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2021-06-10 10:15:28 0 [Note] InnoDB: Completed initialization of buffer pool
2021-06-10 10:15:29 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-06-10 10:15:29 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-06-10 10:15:29 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-06-10 10:15:29 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2021-06-10 10:15:29 0 [Note] InnoDB: Waiting for purge to start
2021-06-10 10:15:29 0 [Note] InnoDB: 10.4.19 started; log sequence number 47133; transaction id 8
2021-06-10 10:15:29 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2021-06-10 10:15:29 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-06-10 10:15:29 0 [Note] InnoDB: Buffer pool(s) load completed at 210610 10:15:29
2021-06-10 10:15:29 0 [Note] Server socket created on IP: '::'.
Tried to:
Rename the folder mysql/data to mysql/data_old (you can use any name)
Create a new folder mysql/data
Copy the content that resides in mysql/backup to the new mysql/data folder
Copy all your database folders that are in mysql/data_old to mysql/data (skipping the mysql, performance_schema, and phpmyadmin folders from data_old)
Finally copy the ibdata1 file from mysql/data_old and replace it inside mysql/data folder
Start MySQL from XAMPP control panel
Also tried:
exit Xampp server
go to your C:\xampp\mysql\data directory
delete the ibdata1 file
restart xampp server
Who knows the solution?
If anyone will be interested in the answer, just reinstalled the xammp control panel since it was still giving me errors
btw for future reference this can happen when you shut down your computer with xampp still running.

Too many times in my logs - PDOException: SQLSTATE[HY000] [2002] No such file or directory

in the last few days my log files have recorded hundreds of those errors, the website is working fine and I am not able to replicate this issue. I believe the error occur when there is a lot of traffic on the website (actually in my access logs it looks like the more errors are caused when crawlers are scanning the website).
I've seen a similar error when exporting the database (few hundred of MBs) through Sequel Pro where in some case "the mysql server has gone away" but if I wait few seconds and try to reconnect the export continues.
I was wondering if there is any fix or if there is any log I can check to find out more about this error, I know that probably increasing the server resources could make the error disappear but I want to be sure that's the real cause.
Is there any mysql config I should look at that could cause (or mitigate) that error?
I also have another question, I'm connecting to mysql using localhost as host, do I get any benefit if I change it to 127.0.0.1?
PS: the backend is a Laravel php application, the more errors have been registered in the homepage (there is only one query being executed on that page and it's a simple select * from table, the table has < 1000 records and it's well indexed, two queries if you are logged in).
The website doesn't have so much traffic, around 6k pageviews per day - excluding crawlers.
In some case the first error I get is a "connection refused" followed by the "no such file or directory"
2016-11-15 09:01:07 PDOException: SQLSTATE[HY000] [2002] Connection refused
2016-11-15 09:01:07 PDOException: SQLSTATE[HY000] [2002] No such file or directory
This is what the mysql error.log looks like when I get the mentioned error (in both cases, when I first get the "connection refused" and when I just get the "no such file or directory":
2016-11-15T09:01:07.630308Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2016-11-15T09:01:07.630539Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2016-11-15T09:01:07.867266Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-11-15T09:01:07.872957Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.16-0ubuntu0.16.04.1) starting as process 5603 ...
2016-11-15T09:01:07.897867Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-11-15T09:01:07.897929Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-11-15T09:01:07.897945Z 0 [Note] InnoDB: Uses event mutexes
2016-11-15T09:01:07.897955Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-11-15T09:01:07.897964Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-11-15T09:01:07.897973Z 0 [Note] InnoDB: Using Linux native AIO
2016-11-15T09:01:07.899168Z 0 [Note] InnoDB: Number of pools: 1
2016-11-15T09:01:07.900244Z 0 [Note] InnoDB: Using CPU crc32 instructions
2016-11-15T09:01:07.902815Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-11-15T09:01:07.915239Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-11-15T09:01:07.917561Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2016-11-15T09:01:07.933388Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2016-11-15T09:01:07.938259Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 6776343956
2016-11-15T09:01:07.938307Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 6776343965
2016-11-15T09:01:07.938643Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 6776343965
2016-11-15T09:01:07.938665Z 0 [Note] InnoDB: Database was not shutdown normally!
2016-11-15T09:01:07.938678Z 0 [Note] InnoDB: Starting crash recovery.
2016-11-15T09:01:08.434497Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2016-11-15T09:01:08.434545Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2016-11-15T09:01:08.434598Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2016-11-15T09:01:08.464096Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2016-11-15T09:01:08.465115Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2016-11-15T09:01:08.465130Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2016-11-15T09:01:08.465391Z 0 [Note] InnoDB: Waiting for purge to start
2016-11-15T09:01:08.515613Z 0 [Note] InnoDB: 5.7.16 started; log sequence number 6776343965
2016-11-15T09:01:08.516097Z 0 [Note] Plugin 'FEDERATED' is disabled.
2016-11-15T09:01:08.516403Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2016-11-15T09:01:08.530024Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2016-11-15T09:01:08.530080Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2016-11-15T09:01:08.530102Z 0 [Note] - '127.0.0.1' resolves to '127.0.0.1';
2016-11-15T09:01:08.530142Z 0 [Note] Server socket created on IP: '127.0.0.1'.
2016-11-15T09:01:08.539042Z 0 [Note] InnoDB: Buffer pool(s) load completed at 161115 9:01:08
2016-11-15T09:01:08.566608Z 0 [Note] Event Scheduler: Loaded 0 events
2016-11-15T09:01:08.566918Z 0 [Note] /usr/sbin/mysqld: ready for connections.
The diference between using '127.0.0.1' and 'localhost' is that mysql will try to connect using standard network mechanism or using a local machine socket (this one is recommended because its faster)
The error appears because Doctrine has some kind of "localhost socket detector" that appears to fail in several cases, as described in here
PDOException SQLSTATE[HY000] [2002] No such file or directory
or
Troubleshooting "No such file or directory" when running `php app/console doctrine:schema:create`
The best solution (using 127.0.0.1 it doesnt look the good one for me) is to discover the socket location
mysql> show variables like 'socket';
+---------------+-----------------------------+
| Variable_name | Value |
+---------------+-----------------------------+
| socket | /var/run/mysqld/mysqld.sock |
+---------------+-----------------------------+
and pass that value to the mysql connector on php (in laravel it seems that its located in database.php)

Xampp mysql innodb recovery failed after pc crash

So it's happened to me a few times that i have this issue. I didn't realised why it's happening i just know after restarting pc mysql won't start.
So i was reinstalling xampp and messing around few times untill i got it work. Last time when it happened i looked at mysql.err file and noticed errors are about corrupted files. So i deleted those databases and mysql started
But today i have seen the right reason. I was sitting by pc when it suddenly got frozen and restarted. After that mysql won't start.
Looking at my localhost/xampp status page it says mysql deactivated
Went to check logs, actually mysql.err file and there it says recovery from crash and innodb can't recover from crash.
Here are the logs
2014-03-05 11:18:11 7829 mysqld_safe Starting mysqld daemon with databases from /opt/lampp/var/mysql
2014-03-05 11:18:11 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
2014-03-05 11:18:11 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-03-05 11:18:11 8235 [Note] Plugin 'FEDERATED' is disabled.
2014-03-05 11:18:11 8235 [Note] InnoDB: The InnoDB memory heap is disabled
2014-03-05 11:18:11 8235 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-03-05 11:18:11 8235 [Note] InnoDB: Compressed tables use zlib 1.2.8
2014-03-05 11:18:11 8235 [Note] InnoDB: Not using CPU crc32 instructions
2014-03-05 11:18:11 8235 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2014-03-05 11:18:11 8235 [Note] InnoDB: Completed initialization of buffer pool
2014-03-05 11:18:11 8235 [Note] InnoDB: Highest supported file format is Barracuda.
2014-03-05 11:18:11 8235 [Note] InnoDB: The log sequence numbers 11011943 and 11011943 in ibdata files do not match the log sequence number 11012198 in the ib_logfiles!
2014-03-05 11:18:11 8235 [Note] InnoDB: Database was not shutdown normally!
2014-03-05 11:18:11 8235 [Note] InnoDB: Starting crash recovery.
2014-03-05 11:18:11 8235 [Note] InnoDB: Reading tablespace information from the .ibd files...
2014-03-05 11:18:11 8235 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace wpdemo/wp_terms uses space ID: 93 at filepath: ./wpdemo/wp_terms.ibd. Cannot open tablespace wordpress/wp_evg_feeds which uses space ID: 93 at filepath: ./wordpress/wp_evg_feeds.ibd
2014-03-05 11:18:11 7f3ca4a11700 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
InnoDB: Error: could not open single-table tablespace file ./wordpress/wp_evg_feeds.ibd
InnoDB: We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
InnoDB: To fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot
InnoDB: open the file, you should modify the permissions.
InnoDB: 2) If the table is not needed, or you can restore it from a backup,
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
InnoDB: crash recovery and ignore that table.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.
2014-03-05 11:18:11 7829 mysqld_safe mysqld from pid file /opt/lampp/var/mysql/aleksandar-PC.pid ended
Last time when i got an error i didn't realised it was because of pc crash and i didn't needed files, so i just deleted corrupted database files and mysql started. Problem is now I CAN'T delete any file, i need those databases back and working.
Any suggestions?
So renaming broken files to for example wp_terms.ibd.bkp so mysql can skip those tables and start. Now when mysql recovered and started, i shut it down regularly. Than renamed .bkp files back to normal table files and started mysql back. Now when mysql is shut down regularly it won't check for recovery and started normally. The files that are supposed to be broken are working now. And everything is back to normal. What a logic!

Categories