Reputation: 21
Today I run MySQL and MySQL is not working, giving the following error in the console:
8:30:43 AM [mysql] Error: MySQL shutdown unexpectedly.
8:30:43 AM [mysql] This may be due to a blocked port, missing dependencies,
8:30:43 AM [mysql] improper privileges, a crash, or a shutdown by another method.
8:30:43 AM [mysql] Press the Logs button to view error logs and check
8:30:43 AM [mysql] the Windows Event Viewer for more clues
8:30:43 AM [mysql] If you need more help, copy and post this
8:30:43 AM [mysql] entire log window on the forums
When checking the "/xampp/mysql/data/mysql_error.log" file I get:
InnoDB: using atomic writes.
2021-03-16 8:30:41 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2021-03-16 8:30:41 0 [Note] InnoDB: Uses event mutexes
2021-03-16 8:30:41 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-03-16 8:30:41 0 [Note] InnoDB: Number of pools: 1
2021-03-16 8:30:41 0 [Note] InnoDB: Using SSE2 crc32 instructions
2021-03-16 8:30:41 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2021-03-16 8:30:41 0 [Note] InnoDB: Completed initialization of buffer pool
2021-03-16 8:30:41 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-03-16 8:30:41 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-03-16 8:30:41 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-03-16 8:30:41 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2021-03-16 8:30:41 0 [Note] InnoDB: Waiting for purge to start
2021-03-16 8:30:42 0 [Note] InnoDB: 10.4.17 started; log sequence number 47072; transaction id 8
2021-03-16 8:30:42 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2021-03-16 8:30:42 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-03-16 8:30:42 0 [Note] InnoDB: Buffer pool(s) load completed at 210316 8:30:42
2021-03-16 8:30:42 0 [Note] Server socket created on IP: '::'.
Upvotes: 2
Views: 6892
Reputation:
This error often occurs when XAMPP or MAMP is configured to start MySQL and PHP on system startup and by default MySQL uses port 3306. We have to change this port from an old to a new one like this:
Here:
# The following options will be passed to all MySQL clients
[client]
Password = your_password
port = 3306 #---> 3307
socket = "/ xampp / mysql / mysql.sock"
and also here:
The MySQL server
[ mysqld ]
port = 3306 #---> 3307
socket = "/ xampp / mysql / mysql.sock"
Upvotes: 0
Reputation: 4154
Delete these file and restart mysql service.
/var/lib/mysqld/ib_logfile0
/var/lib/mysql/ib_logfile1
/var/lib/mysql/aria_log_control
Upvotes: 5