Friday, June 23, 2023

Resolve problem of MySQL on XAMPP

7:47:48 PM  [mysql] Error: MySQL shutdown unexpectedly.

7:47:48 PM  [mysql] This may be due to a blocked port, missing dependencies, 

7:47:48 PM  [mysql] improper privileges, a crash, or a shutdown by another method.

7:47:48 PM  [mysql] Press the Logs button to view error logs and check

7:47:48 PM  [mysql] the Windows Event Viewer for more clues

7:47:48 PM  [mysql] If you need more help, copy and post this

7:47:48 PM  [mysql] entire log window on the forums

___________________________________________________________________________

2023-06-23 19:47:48 0 [Note] Starting MariaDB 10.4.28-MariaDB source revision c8f2e9a5c0ac5905f28b050b7df5a9ffd914b7e7 as process 17424
2023-06-23 19:47:48 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2023-06-23 19:47:48 0 [Note] InnoDB: Uses event mutexes
2023-06-23 19:47:48 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2023-06-23 19:47:48 0 [Note] InnoDB: Number of pools: 1
2023-06-23 19:47:48 0 [Note] InnoDB: Using SSE2 crc32 instructions
2023-06-23 19:47:48 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2023-06-23 19:47:48 0 [Note] InnoDB: Completed initialization of buffer pool
2023-06-23 19:47:48 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2023-06-23 19:47:48 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-06-23 19:47:48 0 [Note] InnoDB: Setting file 'D:\xampp8\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-06-23 19:47:48 0 [Note] InnoDB: File 'D:\xampp8\mysql\data\ibtmp1' size is now 12 MB.
2023-06-23 19:47:48 0 [Note] InnoDB: Waiting for purge to start
2023-06-23 19:47:49 0 [Note] InnoDB: 10.4.28 started; log sequence number 4909603; transaction id 5570
2023-06-23 19:47:49 0 [Note] InnoDB: Loading buffer pool(s) from D:\xampp8\mysql\data\ib_buffer_pool
2023-06-23 19:47:49 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-06-23 19:47:49 0 [Note] InnoDB: Buffer pool(s) load completed at 230623 19:47:49
2023-06-23 19:47:49 0 [Note] Server socket created on IP: '::'.






AND How to resolve this problem is:
Go to xampp/mysql directory
Rename the /data folder to /data_old
Copy the /backup folder and paste in same place
Rename the /backup_copy folder to /data
Go to /data_old folder and copy all your database folder expect phpmyadmin, mysql, performance_schema
Go to /data folder and paste all database folder copied from /data_old
Go to /data_old folder again and copy ibdata1 file
Go to /data folder again and paste ibdata1 file here
Restart MySQL button server again. twice in my case to make it work.