How to Fix MySQL shutdown unexpectedly error – XAMPP [Steps]

How to Fix MySQL shutdown unexpectedly error – XAMPP [Steps]

How to Fix MySQL shutdown unexpectedly error – XAMPP [Steps]

What is ‘MySQL shutdown unexpectedly’ error – XAMPP error?

If you are experiencing ‘MySQL shutdown unexpectedly’ error on XAMPP Control Panel in your Windows 10/8/7 computer when you use a local development environment or your website unable to connect with its database because MySQL is not running properly, then you are in right place for the solution. Here, you will be guided with easy steps/methods to resolve the error. Let’s starts the discussion.

‘XAMPP’: XAMPP is free and open-source cross-platform web server solution stack package developed by Apache friends consisting mainly of Apache HTTP server, MaiaDB database, Interpreters for scripts written in PHP and Perl programming language. XAMPP’s ease of development means a WAMP or LAMP stack can be installed quickly and simply on an operating system developer, with advantages that common add-in applications like WordPress and Joomla can also be installed with similar ease using Bitnami.

However, several users/XAMPP users reported that they faced ‘MySQL shutdown unexpectedly’ error on XAMPP Control Panel in their Windows 10/8/7 computer. This issue indicates that you can manually shut down MySQL databse software at any point that also happens when you restart your server. When the software is shutdown, your website or local development environment won’t be able to connect to its database. In sort, your website won’t work.

In case, you are getting this error from XAMPP Control Panel, then you need to restore your database from backup because your database is important and you can’t risk that at all. It is possible to resolve this error with our instructions. Let’s go for the solution.

How to fix MySQL shutdown unexpectedly error – XAMPP error?

Method 1: Run XAMPP using Administrator permission

How to Fix MySQL shutdown unexpectedly error – XAMPP [Steps]

This error can be occurred if the XAMPP application is not running with required administrator permission. This is because its components may not be able to function or configure properly at lower permission levels. To run XAMPP with Administrator in Windows 10, open ‘File Explorer’ and go to the installation folder of XAMPP in main drive of computer hard drive, right-click on executable of XAMPP and select ‘Run as Administrator’. Once XAMPP is up and each of its components is running. MySQL should function correctly and you can check it.

Method 2: Restore your Database backup

How to Fix MySQL shutdown unexpectedly error – XAMPP [Steps]

One possible way to fix the issue is to restore XAMPP database backup. XAMPP automatically creates backup for your environment’s software, which you can access within the folder where you install it. By default, your XAMPP MySQL backup files should be stored inside ‘Local Disk > XAMPP > MySQL’ path. However, this location may differ. Inside that folder, two of which are called ‘Data’ and Backup.

How to Fix MySQL shutdown unexpectedly error – XAMPP [Steps]

‘Data’ folder includes all files that of your database uses while ‘Backup’ folder contains a single recent copy of your MySQL. Before restoring your backup, use your XAMPP Control Panel to stop MySQL software by clicking ‘STOP’ button next to MySQL option in the menu. Once stopped MySQL, return XAMPP folder and restore your MySQL backup. To do so, change the name of data folder to anything else ‘Data.old’ and rename ‘Backup’ folder to ‘Data’, and then restart MySQL and check if the error is resolved.

Method 3: Change your MySQL port

This issue can also be occurred if another software is using the port assigned to MySQL. By default, it tends to be 3306. To be certain, you can select NetStat Module from XAMPP Control Pane, next to ‘Shell’ Tool. Netstart Command line tool that can show you active connections on your network including which ports you are using. Once you initialize Netstat, you will be able to see what port each tool in your stack is using including MySQL.

How to Fix MySQL shutdown unexpectedly error – XAMPP [Steps]

If you investigate a conflict with that port caused this issue, restore a backup or running MySQL with Administrator permission in order to fix the issue. If it didn’t work for you, then you can change the port that MySQL uses in order to fix the issue. To do so, at first stop MYSQL service on XAMPP Control Panel and click on ‘Config’ button next to MYSQL and select ‘My.ini’ option.

How to Fix MySQL shutdown unexpectedly error – XAMPP [Steps]

My.ini file contains the MySQL configuration settings. After you click on it, XAMPP will open the file using your default text editor like Notepad. In the opened file, look for the line that reads Port which specifies the port number of MySQL uses. You can change the port number to ‘3307’ and then save the changes. Once done, restart MySQL and check if the issue is resolved. If the issue is still persist, then you might try using different port instead.

Fix Windows PC issues with ‘PC Repair Tool’ [Recommended Solution]

‘PC Repair Tool’ is easy & quick way to find and fix BSOD errors, DLL errors, EXE errors, problems with programs/applications, malware or viruses issues, system files or registry issues, and other system issues with just few clicks. You can get this tool through button/link below.

⇓ Get PC Repair Tool


I am sure this post helped you on How to fix MySQL shutdown unexpectedly error – XAMPP error in Windows 10/8/7 with several easy steps/methods. You can read & follow our instructions to do so. We discussed here that MySQL shutdown unexpectedly error is usually occurred due to required administrator permission not given to XAMPP, issue with the port that MySQL uses and issue with server configurations, and you are provided here with steps to fix. That’s all. For any suggestions or queries, please write on comment box below.

The post How to Fix MySQL shutdown unexpectedly error – XAMPP [Steps] appeared first on Techs Magic.

via techsmagic