XAMPP – MySQL shutdown unexpectedly - xampp

I've just installed XAMPP, and when I try to start my Apache and MySQL in the XAMPP Control Panel, I now get the following errors:
19:27:08 [mysql] Error: MySQL shutdown unexpectedly.
19:27:08 [mysql] This may be due to a blocked port, missing dependencies,
19:27:08 [mysql] improper privileges, a crash, or a shutdown by another method.
19:27:08 [mysql] Press the Logs button to view error logs and check
19:27:08 [mysql] the Windows Event Viewer for more clues
19:27:08 [mysql] If you need more help, copy and post this
19:27:08 [mysql] entire log window on the forums
InnoDB: using atomic writes.
2020-03-17 19:10:21 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-03-17 19:10:21 0 [Note] InnoDB: Uses event mutexes
2020-03-17 19:10:21 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-03-17 19:10:21 0 [Note] InnoDB: Number of pools: 1
2020-03-17 19:10:21 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-03-17 19:10:21 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-03-17 19:10:21 0 [Note] InnoDB: Completed initialization of buffer pool
2020-03-17 19:10:21 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=300288
2020-03-17 19:10:22 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-03-17 19:10:22 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-03-17 19:10:22 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-03-17 19:10:22 0 [Note] InnoDB: Setting file 'D:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-03-17 19:10:22 0 [Note] InnoDB: File 'D:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2020-03-17 19:10:22 0 [Note] InnoDB: Waiting for purge to start
2020-03-17 19:10:22 0 [Note] InnoDB: 10.4.11 started; log sequence number 300297; transaction id 171
2020-03-17 19:10:22 0 [Note] InnoDB: Loading buffer pool(s) from D:\xampp\mysql\data\ib_buffer_pool
2020-03-17 19:10:22 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-03-17 19:10:22 0 [Note] Server socket created on IP: '::'.

This is as a result of some files in C:\xampp\mysql\data\mysql getting corrupted.
first of all, try to end the task in task manager mysqlid.exe end and start again MySQL in Xampp, if there is the same error try this below solution. please backup that data.
Solution:
Back up C:\xampp\mysql\data
Copy all file C:\xampp\mysql\backup
Paste and replace existing file in: C:\xampp\mysql\data, except for
the ibdata1 file. Leaving ibdata1 will help against table does not
exist error.
this solution work for me its link here

I think you can check the ports were used by some application on your windows.
You can change the port:
Go to your xampp folder, find the mysql.cnf or mysql.ini to change the port 3306 to others
Then restart again.

If in your XAMPP control panel when you try to start the mysql it starts by getting PID and port number(3306) and then shutdowns unexpectedly.
The solution which worked for me is just go to your "C:\xampp\mysql\bin" directory (If you have installed on other location go to bin folder of mysql in that) and doubleclick the
mysqld.exe file.It will start working.
It also works using cmd (If you have installed XAMMP in other directory change the path accordingly.)
cd C:\xampp\mysql\bin
mysqld

Follow the steps this may resolve your issue
Close Xampp.
Go to \xampp\mysql\backup.
Copy all files in directory except ibdata1.
Go to \xampp\mysql\data.
Paste the files that you copied from \xampp\mysql\ backup (Replace the files when asked).
Start Xampp.

Related

MariaDB shutdown unexpectedly. mysqld.exe: Aria recovery failed

mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files
I am using xampp and it was working perfectly. Today when I started my Windows computer and tried to start the MariaDB Server from xampp control panel v3.3.0 the xampp showed the following error:
9:37:34 AM [mysql] Error: MySQL shutdown unexpectedly.
9:37:34 AM [mysql] This may be due to a blocked port, missing dependencies,
9:37:34 AM [mysql] improper privileges, a crash, or a shutdown by another method.
9:37:34 AM [mysql] Press the Logs button to view error logs and check
9:37:34 AM [mysql] the Windows Event Viewer for more clues
9:37:34 AM [mysql] If you need more help, copy and post this
9:37:34 AM [mysql] entire log window on the forums
And when I checked the log file mysql_error.log the following error was displayed:
2022-09-09 9:37:32 0 [ERROR] mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files
2022-09-09 9:37:32 0 [ERROR] Plugin 'Aria' init function returned error.
2022-09-09 9:37:32 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2022-09-09 9:37:32 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2022-09-09 9:37:32 0 [Note] InnoDB: Uses event mutexes
2022-09-09 9:37:32 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-09-09 9:37:32 0 [Note] InnoDB: Number of pools: 1
2022-09-09 9:37:32 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-09-09 9:37:32 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2022-09-09 9:37:32 0 [Note] InnoDB: Completed initialization of buffer pool
2022-09-09 9:37:33 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2022-09-09 9:37:33 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-09-09 9:37:33 0 [Note] InnoDB: Setting file 'D:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-09-09 9:37:33 0 [Note] InnoDB: File 'D:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2022-09-09 9:37:33 0 [Note] InnoDB: Waiting for purge to start
2022-09-09 9:37:33 0 [Note] InnoDB: 10.4.24 started; log sequence number 35377535; transaction id 5422
2022-09-09 9:37:33 0 [Note] InnoDB: Loading buffer pool(s) from D:\xampp\mysql\data\ib_buffer_pool
2022-09-09 9:37:33 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-09-09 9:37:33 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2022-09-09 9:37:33 0 [ERROR] Failed to initialize plugins.
2022-09-09 9:37:33 0 [ERROR] Aborting
The main problem is with Plugin 'Aria' which is not starting as shown in the first line of the log above
mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files
I had a similar issue and the method mentioned in this link fixed mine.
Delete all files named as aria_log.######## where ######## is any number from xampp\mysql\data folder.
I deleted the following file
aria_log.00000001
From xampp\mysql\data and the MySql server started successfully.

Xampp starts SQL than shuts down unexpectedly. No solution seems to work

so I wanted to start my SQL today and after I press on start I get this Message:
13:48:29 [mysql] Error: MySQL shutdown unexpectedly.
13:48:29 [mysql] This may be due to a blocked port, missing dependencies,
13:48:29 [mysql] improper privileges, a crash, or a shutdown by another method.
13:48:29 [mysql] Press the Logs button to view error logs and check
13:48:29 [mysql] the Windows Event Viewer for more clues
13:48:29 [mysql] If you need more help, copy and post this
13:48:29 [mysql] entire log window on the forums
I checked the error_log file and this inside.
InnoDB: using atomic writes.
2020-06-25 13:48:27 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-06-25 13:48:27 0 [Note] InnoDB: Uses event mutexes
2020-06-25 13:48:27 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-06-25 13:48:27 0 [Note] InnoDB: Number of pools: 1
2020-06-25 13:48:27 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-06-25 13:48:27 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-06-25 13:48:27 0 [Note] InnoDB: Completed initialization of buffer pool
2020-06-25 13:48:27 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-06-25 13:48:27 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-06-25 13:48:27 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-06-25 13:48:27 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2020-06-25 13:48:27 0 [Note] InnoDB: Waiting for purge to start
2020-06-25 13:48:27 0 [Note] InnoDB: 10.4.13 started; log sequence number 5299770; transaction id 988
2020-06-25 13:48:27 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2020-06-25 13:48:27 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-06-25 13:48:27 0 [Note] InnoDB: Buffer pool(s) load completed at 200625 13:48:27
2020-06-25 13:48:27 0 [Note] Server socket created on IP: '::'.
I already tried these solutions to fix the problem:
Nothing else is blocking the port. Not Skype not anything.
Deleted the ibtmp1 file and ib_... log files and restarted the Server.
Changed the port from 3306 to 3307.
Changed max_allowed_packet from 1M to 128M
End mysql task in task manager (This does not work because I have no such task running)
This is the third time this is happening. The only way I can get it to work again if I reinstall xampp. But it takes like 30 min to connect everything again and import my tables again. Also I have to constantly export my tables so I dont loose any changes.
Is there anything else i can try?

Cannot connect to mySQL after recovering InnoDB tables without Ibdata1 file [xampp and localhost]

First of all, you should know that I have few knowledge of mySQL, databases, xampp and so on. I will try to explain my problem the best I can.
Secondly, notice that I have already searched for solutions in this site and others, but I do not find anyone that applies to my specific situation.
I was developing my first wordpress website using bitnami_wordpress and xampp. A few days ago I had a problem connecting to a mySQL local server. Due to my ignorance, when I was trying to solve my problem, I ended up overwriting the ibdata1 file from my xampp/mysql/data folder with the one stored in xampp\mysql\backup. Big mistake! The backup may be too old and now my database was "corrupted". When I tried to access the tables in the phpmyadmin panel there was a message saying "table doesn't exist in engine".
I looked for solutions in the net and I finally decided to follow these steps to restore my data: https://zadpen.com/20-restore-lost-data-in-mysql-using-innodb-engine-without-file-ibdata1.html
These are the main steps:
Add innodb_file_per_table=1 in xampp\mysql\bin\my.ini
Create a new database for the website (I used same name as the original one while I changed the name of the old one)
Recovering the tables structure of the old database. For example: mysqlfrm --server=root:#localhost:3306 wp_cn_social_icon.frm --port 3333 > wp_cn_social_icon.sql
Creating the table using the SQL statements of the previous step.
Discard the .ibd files of the new database ALTER TABLE wp_cn_social_icon DISCARD TABLESPACE;
Copying the original .ibd file from the old database to the new one.
"linking" the .ibd to the .frm file of the new database: ALTER TABLE wp_cn_social_icon IMPORT TABLESPACE;
I repeated these steps for all the tables.
It worked. I was able to see again all the data in the tables in the phpmyadmin control panel! I was so happy! HOWEVER, happiness lasted a few minutes. As soon as I stopped Xampp and restarted it again, I found up that I was able to access other databases in the phpMyAdmin panel, but not the website database I was interested in. This was the error:
I think nothing is wrong in the configInc.php file...is it?
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1:3306';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
I then tried to connect to the server through the Windows CMD (I didnt' know what to do... I was just desperate) I used the command: mysql -u root -p. And then I write down: mysql use website_database. After doing this, the connection was interrupted and I have not been able to start again the mysql server.
Now Xampp shows this error everytime I attempt to start MySQL.
16:45:33 [mysql] Attempting to start MySQL app...
16:45:33 [mysql] Status change detected: running
16:45:36 [mysql] Status change detected: stopped
16:45:36 [mysql] Error: MySQL shutdown unexpectedly.
16:45:36 [mysql] This may be due to a blocked port, missing dependencies,
16:45:36 [mysql] improper privileges, a crash, or a shutdown by another method.
16:45:36 [mysql] Press the Logs button to view error logs and check
16:45:36 [mysql] the Windows Event Viewer for more clues
16:45:36 [mysql] If you need more help, copy and post this
16:45:36 [mysql] entire log window on the forums
The mysql_error.log file shows this:
2020-06-06 16:45:34 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-06-06 16:45:34 0 [Note] InnoDB: Uses event mutexes
2020-06-06 16:45:34 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-06-06 16:45:34 0 [Note] InnoDB: Number of pools: 1
2020-06-06 16:45:34 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-06-06 16:45:34 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-06-06 16:45:34 0 [Note] InnoDB: Completed initialization of buffer pool
2020-06-06 16:45:34 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-06-06 16:45:34 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-06-06 16:45:34 0 [Note] InnoDB: Setting file 'C:\Program Files\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-06-06 16:45:34 0 [Note] InnoDB: File 'C:\Program Files\xampp\mysql\data\ibtmp1' size is now 12 MB.
2020-06-06 16:45:34 0 [Note] InnoDB: Waiting for purge to start
2020-06-06 16:45:34 0 [Note] InnoDB: 10.4.11 started; log sequence number 896271; transaction id 990
2020-06-06 16:45:34 0 [Note] InnoDB: Loading buffer pool(s) from C:\Program Files\xampp\mysql\data\ib_buffer_pool
2020-06-06 16:45:34 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-06-06 16:45:34 0 [Note] Server socket created on IP: '::'.
I did not change any connection settings... I Just followed the steps of that website to recover the data. What may be wrong? I must be doing something wrong or missing something related with the connecting settings.
PS: Just in case, I found strange that Ibdata1 file weighs now almost 70Mb...

mysql server on xampp do not works

I know that some questions like mine is in this site and i try all of Those questions to solve my problem But I failed, so i ask new question.
When I open XAMPP and click start MySQL button and it gives me some errors. I had started it just before, but now it isn't working.
4:29:11 PM [mysql] Error: MySQL shutdown unexpectedly.
4:29:11 PM [mysql] This may be due to a blocked port, missing dependencies,
4:29:11 PM [mysql] improper privileges, a crash, or a shutdown by another method.
4:29:11 PM [mysql] Press the Logs button to view error logs and check
4:29:11 PM [mysql] the Windows Event Viewer for more clues
4:29:11 PM [mysql] If you need more help, copy and post this
4:29:11 PM [mysql] entire log window on the forums
Here is the contents of the error log:
2019-12-17 16:25:22 0 [ERROR] mysqld.exe: Aria engine: log data error last_log_page: (1,0x2000) is
less than checkpoint page: (1,0x4000)
2019-12-17 16:25:22 0 [ERROR] mysqld.exe: Aria engine: log initialization failed
2019-12-17 16:25:22 0 [ERROR] Plugin 'Aria' init function returned error.
2019-12-17 16:25:22 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed. InnoDB: using atomic writes.
2019-12-17 16:25:22 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-12-17 16:25:22 0 [Note] InnoDB: Uses event
2019-12-17 16:25:22 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-12-17 16:25:22 0 [Note] InnoDB: Number of pools: 1
2019-12-17 16:25:22 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-12-17 16:25:22 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2019-12-17 16:25:22 0 [Note] InnoDB: Completed initialization of buffer pool
2019-12-17 16:25:23 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-12-17 16:25:23 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-12-17 16:25:23 0 [Note] InnoDB: Setting file C:\xampp\mysql\data\ibtmp1' size to 12 MB.Physically writing the file full; Please wait ...
2019-12-17 16:25:23 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2019-12-17 16:25:23 0 [Note] InnoDB: Waiting for purge to start
2019-12-17 16:25:23 0 [Note] InnoDB: 10.4.8 started; log sequence number 113962; transaction id 9
2019-12-17 16:25:23 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2019-12-17 16:25:23 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-12-17 16:25:23 0 [Note] InnoDB: Buffer pool(s) load completed at 191217 16:25:23
2019-12-17 16:25:23 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2019-12-17 16:25:23 0 [ERROR] Failed to initialize plugins.
2019-12-17 16:25:23 0 [ERROR] Aborting
I have tried these solutions before but my problem was not solved
delete the ibdata1 file.
Delete all random files (except the actual database folders) in mysql/data/
Add innodb_force_recovery = 4 below the [mysqld] in the mysql config file (my.ini)
delete the ibdata1 & ib_logfile*(ib_logfile0,ib_logfile1,ib_logfile101) file
Change the location of all files (like test_db) in C:\xampp\mysql\data location for test
change the mysql server port to "3307,3308,9999,6542"
in this places-->
[mysqld]
port=3306
and
[client]
port=3306
socket="C:/xampp/mysql/mysql.sock"
thanks for your help.
The solution is Removing the "aria_log.00000001" file. You can find this file in \xampp\mysql\data. Then restart or start xampp. Also Please run aria_chk -r on all Aria tables and delete all aria_log.######## files’
Possibilties:
incorrect config - try to restore some known good config
blocked port - quite often its skype(especially older versions of skype), try changing MySQL port
If you're not running XAMPP as an administrator, shutting down MySQL
can cause corruption which means you have to repair or delete your
tables. This can easily be avoided by running XAMPP as administrator.

Error Xamp doesn't work

After loading a database on xamp, the program doesn't work
This is the log file
2016-09-28 14:46:03 115c 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.
2016-09-28 14:46:03 4444 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-09-28 14:46:03 4444 [Note] InnoDB: The InnoDB memory heap is disabled
2016-09-28 14:46:03 4444 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-09-28 14:46:03 4444 [Note] InnoDB: Memory barrier is not used
2016-09-28 14:46:03 4444 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-09-28 14:46:03 4444 [Note] InnoDB: Not using CPU crc32 instructions
2016-09-28 14:46:03 4444 [Note] InnoDB: Initializing buffer pool, size = 160.0M
2016-09-28 14:46:03 4444 [Note] InnoDB: Completed initialization of buffer pool
2016-09-28 14:46:03 4444 [Note] InnoDB: Highest supported file format is Barracuda.
2016-09-28 14:46:03 4444 [Note] InnoDB: The log sequence numbers 1835037 and 1835037 in ibdata files do not match the log sequence number 2351448096 in the ib_logfiles!
2016-09-28 14:46:03 4444 [Note] InnoDB: Database was not shutdown normally!
2016-09-28 14:46:03 4444 [Note] InnoDB: Starting crash recovery.
2016-09-28 14:46:03 4444 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-09-28 14:46:03 4444 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace american/ps_desktop_menu_tabs_shop uses space ID: 13969 at filepath: .\american\ps_desktop_menu_tabs_shop.ibd. Cannot open tablespace american2/ps_desktop_menu_tabs_shop which uses space ID: 13969 at filepath: .\american2\ps_desktop_menu_tabs_shop.ibd
InnoDB: Error: could not open single-table tablespace file .\american2\ps_desktop_menu_tabs_shop.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.
How i can solve?
I can't reinstall the program because i've a lot of database for work
first, go to services and search for MySQL services after getting it to delete the services and restart the camp will work fine
go check your Xamp folder file in cfolder that probelem fixed.to erase that problem to comeagain xamp is worked.

Resources