Error: MySQL shutdown unexpectedly? Here is how to fix

By Rebecca
15 Min Read
Error: MySQL shutdown unexpectedly

The Error: MySQL shutdown unexpectedly can occur with various Windows services and the message usually appears when you try to perform an action that would usually cause a service to start. The most common occurrence of the Error: MySQL shutdown unexpectedly message would be the SQL service and a similar service.

Many methods can be used to resolve Error: MySQL shutdown unexpectedly issues and we have chosen several methods that have proven successful for other users who have encountered the same issue. Follow the methods below.

Error: MySQL shutdown unexpectedly

Error: MySQL shutdown unexpectedly
Solution 1: Take control of the service

Error: MySQL shutdown unexpectedly issue is typically related to various permissions and can be resolved by granting your user profile access to service controls. This method should be your number one priority for several reasons.

First of all, it is universal and it can be applied regardless of the service showing the error: MySQL shutdown unexpectedly message. Second, it is easy to do and the changes can be rolled back in no time.

  1. Open the run utility using the Windows + R key combination on your keyboard (press these keys simultaneously. Type “services. MSC” in the newly opened box without the quotes and click OK to open the services. tool.
  2. You can also open the Control Panel by locating it in the Start menu. You can also search for it using the search button on the start menu.
  3. Once the Control Panel window opens, change the “View By” option at the top right of the window to “Large Icons”, then scroll down until you find it. ‘Administrative Tools entry. Click on it and locate the Services shortcut at the bottom. Click on it to open it as well.
  4. Find the service giving you the error in the list of services, right-click on it and select Properties from the context menu that appears.
  5. If the service is started (you can check it right next to the service status message), you need to stop it for now by clicking the Stop button in the middle of the window. If it’s stopped, let it stop until we proceed. Go to the Connection tab and click on the Browse… button.
  6. In the “Enter the name of the object to select” entry box, enter the name of your account, click Check names and wait until the name is available.
  7. Click OK when you are finished, and type the password in the Password box when prompted, if you have configured a password. It should now start without problems!

Read more: NET:: ERR_CERT_DATE_INVALID error in Chrome – How to fix

Error: MySQL shutdown unexpectedly
Solution 2: reinstall the problematic service

This method can also be used to resolve an error: MySQL shutdown unexpectedly with any problematic service, as long as it can be removed through the registry editor. This is a more advanced way to restart a service that has been corrupted and cannot be fixed by simply resetting it in Services.

  1. Since you are going to delete a registry key, we recommend that you review this published article to allow you to safely back up your registry to avoid further problems. Nonetheless, nothing bad will happen if you follow the steps carefully and correctly.
  2. Open the registry editor window by typing “Regedit” in the search bar or in the Run dialog box, which you can open using the Windows Key + R key combination. Go to the following key in your registry by navigating in the left pane.
  3. In the opened Services key, locate the problematic service key, right-click on it and choose the Remove option. Confirm the pending dialogs, then restart your computer.

Note: If you cannot delete this key, you might need to add additional access to your user account. This can be done in Registry Editor.

  1. Right-click on the key of the problematic service in the left navigation pane and choose the Permissions option from the context menu.
  2. Under the User or group names option, try to locate your computer’s user name in the list. If you can’t find it, click Add >> Advanced >> Find Now. You should be able to see your user account in the search results. Choose it and then click OK twice until you return to the Permissions folder.
  3. Select your account in the Username or Group Names section, check the Full Control box under Permissions for (Your Username), and apply the changes you made.
  4. After that you can try and delete the key again. Restart your computer afterward.
  5. After restarting, follow the instructions in this article to run an SFC scan which should help you locate the service deleted from the registry and easily bring it back. Check if the problem is gone.

Read more: MySQL tutoring: what is it and how to use the system

Error: mysql shutdown unexpectedly
Solution 3: Delete some files

If the error: mysql shutdown unexpectedly is related to the MySQL service on your computer, there are several methods that can be used to resolve the issue. The first is perhaps the simplest and requires stopping the MySQL service and deleting a few log files in the installation directory.

  1. Open the Control Panel by locating it in the Start menu. You can also search for it using the search button on the start menu.
  2. Once the Control Panel window opens, change the “View By” option at the top right of the window to “Large Icons”, then scroll down until you find it. ‘Administrative Tools entry. Click on it and locate the Services shortcut at the bottom. Click on it to open it as well.
  3. Find the MySQL service in the list of services, right-click on it and select Properties from the context menu that appears. In the middle of the window, click Shut Down, then click OK.
  4. Navigate to the folder where you installed MySQL. Usually this is the C >> Program Files folder or the C >> Program Files (x86) folder. Open the folder and double-click on the “data” folder inside.
  5. Locate the two files named ib_logfile0 and ib_logfile1 , right-click on them and choose the Delete option from the context menu.
  6. Return to the Services window, open the properties of the MySQL service, and click the Start button. Check if the problem is gone.

Read more: How to solve error establishing a database connection in wordpress

Error: mysql shutdown unexpectedly
Solution 4: modify the MySQL configuration files

This MySQL configuration file is called “my.ini” and contains an option known to cause this problem. You can either remove it or disable it, but you should definitely consider this method if the error: mysql shutdown unexpectedly occurs with MySQL. Navigate to the root folder where you installed MySQL.

  1. Usually this is path C >> Program Files or path C >> Program Files (x86). Open the folder and try to locate the “my.ini” file.
  2. Right-click on the located file and choose the Open with option. Notepad is the default program for opening it. It’s not Notepad already.
  3. Inside you should see a list of various commands and options. Use the Ctrl + F key combination or click Edit on the top menu and choose Find.
  4. Type “innodb_flush_method” and check if there are any search results. If so, make sure to set it to normal: innodb_flush_method = normal
  5. If such a command does not exist, you can add it to the bottom of the “my.ini” file by pasting the text above. Make sure to save the changes using the Ctrl + S key combination and then restart your computer. Check if the problem is gone.

The second configuration file to modify if the above process did not resolve your problem is the “my-default.ini” file. This method is useful if the directory folders have been damaged after an update.

  1. In the same root folder that you browsed to, locate and open the “my-default.ini” file.
  2. Right-click on it and choose the Open with option. Notepad is the default program for opening it. It’s not Notepad already.
  3. Under the “[mysqld]” line of the file, make sure everything looks like in this article, under that line. If some options are missing, add them, but you should modify the ones that already exist.
  4. Use the Ctrl + S key combination to save the changes and restart your computer to apply them. Check if the problem is gone now.

Read more: How to use 404 error to your advantage

Error: MySQL shutdown unexpectedly
Solution 5: reinstall SQL Server

This method appeals to users of SQL Server, another tool dealing with databases. It is time to perform a fresh installation of the program, as this should fix the issue immediately. A fresh install is necessary if you want to get rid of all the files, as even temporary files can sometimes cause this problem.

  1. First, make sure that you are logged in with an administrator account, as you will not be able to uninstall SQL Server if you are not an administrator.
  2. Make sure to create backups of the databases you want to keep, as this process will delete them.
  3. Click on the Start menu and open the Control Panel by finding it and clicking on it. You can also click the gear icon to open Settings if you’re using Windows 10.
  4. In Control Panel, select the View as Category option in the upper right corner and click Uninstall a program in the Programs section.
  5. If you are using the Settings application, click Applications to open a list of all applications and programs installed on your computer.
  6. Find the SQL Server entry in the list and click on it. Click the Uninstall button above the list and confirm any dialog boxes. Follow the on-screen instructions to uninstall SQL Server, and be sure to restart your computer afterward.

After that, you will need to delete the Spotify registry data left on your computer by following the steps below:

  1. Open the registry editor window by typing “Regedit” in the search bar or in the Run dialog box, which you can open using the Windows Key + R key combination. Find and delete the keys following in the registry: HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Microsoft SQL Server
    HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ MSSQLServer
  2. After that, go to the following location in the registry and delete all the keys referring to SQL Server:
    HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services
  3. Find SQL on your computer and rename all the folders that reference it. Restart your computer after performing these steps.
  4. Navigate to this link to download the SQL tool you installed, save the file to your computer, and run it. Follow the steps below to install it and check if the problem persists.

Read more: URL: blacklist what is it and how to remove your Site from Google

Error: MySQL shutdown unexpectedly
Solution 6: Windows EAServer service method

If the error: mysql shutdown unexpectedly appears when the EAServer service is about to start, you can fix it with this method without too much trouble. It only involved editing a registry key representing the name of the service that might have been corrupted recently, possibly after an update to your operating system or the program you are using.

We hope you still have your registry backup ready and have already found it in the first solution!

  1. Open the registry editor window by typing “Regedit” in the search bar or in the Run dialog box, which you can open using the Windows Key + R key combination. Go to the following key in your registry by navigating in the left pane:
    HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services
  2. Try to locate the EAServer entry in the list under Services and click it once to open the list of associated registry keys.
  3. Locate the SERVERNAME key, right-click on it and choose the Modify option. Under the Value data bar, be sure to enter EAServer and apply the changes. Check if the problem is gone.

 

 

For website maintenance service contact us

Posted by Rebecca
Follow:
Rebecca is an Independent content writer for breldigital, She writes content on any given topic. She loves to write a case study article or reviews on a brand, Be it any topic, she nails it