Xampp не запускается mysql windows 10

I've just installed XAMPP for Windows - should be the newest version (XAMPP Control Panel v3.2.1). Apache is running just fine on port 80 and 443, but MySQL is not starting. When I press the start

I’ve just installed XAMPP for Windows — should be the newest version (XAMPP Control Panel v3.2.1).

Apache is running just fine on port 80 and 443, but MySQL is not starting. When I press the start button, I get this message:

Attempting to start MySQL service…

Then a window pops up and asks me if I want to allow this, which I want. But nothing happens after that. I can press as many times as I want, but with the same result.

What can I do with MySQL?

Melebius's user avatar

Melebius

5,9674 gold badges35 silver badges50 bronze badges

asked Jan 22, 2014 at 9:52

BeHaa's user avatar

4

If you have MySQL already installed on your windows then go to services.msc file on your windows and right click the MySQL file and stop the service, now open your XAMPP and start MySQL. Now MySQL will start on the port 3306.

answered Feb 27, 2016 at 8:39

suki ramachandran's user avatar

1

I had an issue with this because I had accidentally installed XAMPP to c:windowsprogram files (x86) which caused a Windows permissions issue.

The installation says not to install it there, but I thought it had said to install it there.

I uninstalled and reinstalled to c:xampp and it worked.

answered Jan 15, 2017 at 17:51

Eoin's user avatar

EoinEoin

1,3512 gold badges16 silver badges32 bronze badges

2

After Stop xampp, go to configure and change the port 3306 to 3308 of mysql and save. Now start the sql……Enjoy

answered Apr 24, 2016 at 10:16

Alok kumar's user avatar

Alok kumarAlok kumar

811 silver badge1 bronze badge

  1. In the cmd type: services.msc Find MySql and change properties to the disabled.
  2. In the control panel of Xampp uninstall MySql by the checkbox on the left side, and install again by the click in the same checkbox.

TrebledJ's user avatar

TrebledJ

8,4767 gold badges25 silver badges47 bronze badges

answered Feb 10, 2019 at 13:29

surbaniak's user avatar

surbaniaksurbaniak

811 silver badge3 bronze badges

2

Windows 10 Users:

I had this issue too. A little bit of investigating helped out though. I had a problem before this one, that 3306 was being used. So what I found out was that port 3306 was being used by another program. Specifically a JDBC program I was trying to learn and I had xammp installed before I tried this JDBC out. So I deleted the whole file and then here I am, where you’re at. The issue was that my ‘ImagePath'(registry variable) was changed upon installing mySql again. To put it simply, xammp doesn’t know where your mysqld.exe is at anymore, or the file is not in the location that you told it to be. Here’s how to fix it:

  1. Open run (Win + r) and type ‘regedit’. This is where you edit your registry.
  2. Navigate to: HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > MySql

enter image description here

  1. Click on mySql and notice the ImagePath variable. Right click ‘ImagePath’ and click modify.
  2. Enter the location of your xammp mySqld file (navigate through xammp to find it) Although it is likely the same as mine.

Cool Sources:

https://superuser.com/questions/222238/how-to-change-path-to-executable-for-a-windows-service/252850

https://dev.mysql.com/doc/mysql-windows-excerpt/5.7/en/mysql-installation-windows-path.html

Thanks dave

answered Oct 4, 2019 at 23:07

Thomas's user avatar

ThomasThomas

2,3161 gold badge8 silver badges16 bronze badges

1

One of many reasons is xampp cannot start MySQL service by itself. Everything you need to do is run mySQL service manually.

First, make sure that ‘mysqld.exe‘ is not running, if have, end it. (go to Task Manager > Progresses Tab > right click ‘mysqld.exe’ > end task)

Open your services.msc by Run (press ‘Window + R’) > services.msc or 0n your XAMPP ControlPanel, click ‘Services’ button.
Find ‘MySQL‘ service, right click and run it.

answered Aug 19, 2016 at 8:06

nguyendc's user avatar

1

Only stop My sql In Xampp For 15 Min After 15 min restart Mysql .If my sql running But Port Not Showing in Xampp then Click Config > my.ini edit this file and change port no 3306 > 3307 and save and Restart xampp ………

answered Aug 31, 2015 at 9:42

Arghya's user avatar

0

Only for windows
I have fixed the mysql startup issue by following below steps

Steps:

  1. Open CMD and copy paste the command netstat -ano | findstr 3306
    If you get any result for command then the Port 3306 is active

  2. Now we want to kill the active port(3306), so now open powershell and paste the command
    Stop-Process -Id (Get-NetTCPConnection -LocalPort 3306).OwningProcess -Force

Where 3306 is active port. Now port will be inactive

Start Mysql service from Xampp which will work fine now

Note: This works only if the port 3306 is in active state. If you didn’t get any result from step 1 this method is not applicable. There could be some other errors

For other ports change 3306 to "Required port"

Ways to open CMD and Powershell

  1. For CMD-> search for cmd from start menu
  2. For Powershell-> search for powershell from start menu

answered Jan 24, 2020 at 11:20

Mohamed Sulaimaan Sheriff's user avatar

Had this problem today, on a Windows 10 machine. Opened C:xamppdatamysql_error.log and looked for lines containing [ERROR].

Last error line was:

... [ERROR] InnoDB: File (unknown): 'close' returned OS error 206. Cannot continue operation

Important note: if your error is different, google it (you’ll likely find a fix).

Searching for the above error, found this thread on Apache Friends Support Forum, which led me to the fix:

  1. Open C:xamppmysqlbinmy.ini and add the following line towards the end of [mysqld] section (above the line containing ## UTF 8 Settings):
innodb_flush_method=normal
  1. Restart MySQL service. Should run just fine.

answered Dec 24, 2018 at 7:23

tao's user avatar

taotao

77.4k15 gold badges109 silver badges139 bronze badges

Did you use the default installation path?

In my case, when i ran mysql_start.bat I got the following error:

Can`t find messagefile 'D:xamppmysqlshareerrmsg.sys'

I moved my xampp folder to the root of the drive and it started working.

Hope it helps

answered Feb 4, 2016 at 3:04

Oltamor's user avatar

OltamorOltamor

1211 silver badge4 bronze badges

If you have other testing applications like SQL web batch etc, uninstall them because they are running in port 3306.

answered Nov 8, 2017 at 6:56

Shibhe Tepa's user avatar

I have the same problem. Finally found the solution:

The Relocate XAMPP option in the setup tool didn’t correctly relocate the paths and corrupted them, I’ve manually changed the directories inside my.ini (base dir, data dir , …). After that mysql started successfully.

answered Feb 26, 2019 at 7:47

SAMPro's user avatar

SAMProSAMPro

1,0561 gold badge18 silver badges38 bronze badges

The problem I had was changing the path of the Xammp folder in the system.

Eric Aya's user avatar

Eric Aya

69.1k35 gold badges179 silver badges250 bronze badges

answered Dec 12, 2022 at 7:30

mehmet's user avatar

mehmetmehmet

4273 silver badges12 bronze badges

I can share how I solved the problem in my case.

It seems that somehow I had mySQL Server 5.7 installed. It didn’t show on Add/Remove Programs list in Windows tough so I wasn’t aware of it. I marked that after I looked up the XAMPP log.

Just after XAMPP launched it has shown in the log that there is a conflict in mySQL and indicated the folder where my mySQL Server 5.7 is installed. I removed mySQL 5.7 manually from Program Files (x86) and ProgramData folder, restarted and XAMPP mySQL started normally then.

I’ve tried only stopping the mySQL service but for me it didn’t work. Only manually deleting all mySQL 5.7 folders seemed to have helped.

K.Dᴀᴠɪs's user avatar

K.Dᴀᴠɪs

9,88511 gold badges34 silver badges43 bronze badges

answered Dec 12, 2018 at 21:53

radek's user avatar

radekradek

471 silver badge7 bronze badges

Everytime my MySQL starts, it will stop, then I noticed that some files are getting generated in C:xamppmysqldata. I tried deleting some files (like the Error logs, err file, etc.) on that directory. Back up first what you’re going to delete to avoid losing data.

I don’t know how it works. I’m just trying to enable HTTPS in my local machine but then suddenly MySQL can’t be started. But now it’s working.

I’m using Windows 10 and XAMPP 3.2.4.

answered Nov 30, 2019 at 15:41

Bawm's user avatar

BawmBawm

693 bronze badges

This worked for me.

  1. Search for Services in Windows Start

enter image description here

  1. Find MySQL in it.

enter image description here

  1. Right Click and Stop MySQL. Would work on XAMPP Now.

Note: If you wanna use the MYSQL prompt again, you will have to start the MYSQL from Service again.

answered Nov 17, 2021 at 7:03

Kavya Goyal's user avatar

In my case I had xampp installed with PHP 7.4.
But I needed PHP 8.
I downloaded xampp with PHP 8.
Installed it to C:/xampp8/ folder. When I started the new version, it started successfully.
But then I realized that I needed the database data from the old xampp installation. I stopped the new xampp(php 8 version) , and tried to start xampp (php 7.4 version) and saw that Apache started and was working fine, but mysql was not starting.
I tried many settings but couldn’t start mysql from the old xampp.
Solution in my case to copy the data to the new xampp
I went to C:/xampp_old/mysql/data folder. And saw that each of my database has a separate folder inside data folder. I copied all the folders and pasted into
C:/xampp8/mysql/data/
Then I started new xampp and looked in phpmyadmin via browser and I got all my databases back.

answered Mar 10, 2022 at 14:53

Noor Ahmed's user avatar

In the xampp control panel, to the left of «MySQL» there is a green checkbox, click it to uninstall MySQL service. After that you can start MySQL from the same control panel. You can install those services again, it will still work.

answered Oct 20, 2022 at 7:26

Sunil Kumar's user avatar

Sunil KumarSunil Kumar

5,4825 gold badges33 silver badges38 bronze badges

What worked for me was to run xampp «as administrator». Fixed.

answered Nov 14, 2022 at 14:54

user13134936's user avatar

1

I solved this problem by removing all the information in the path

C:xamppmysqldata

And copy the information inside this path

C:xamppmysqlbackup

answered Jan 7 at 16:52

Ali Azmoodeh's user avatar

In Windows, you should go: Start > Run > services.msc > Apache 2.4 > Properties > Start Mode > Automatic > Apply > Start > OK > [Same as MySQL]

answered Jan 19, 2015 at 7:17

Dao Minh Duc's user avatar

if all solutions up did not work for you, make sure the service is running and not set to Disabled!
Go to Services from Control panel and open Services,
Search for Apache2.4 and mysql then switch it to enabled, in the column of status it should be switched to Running

answered May 2, 2020 at 9:43

Ahmad's user avatar

AhmadAhmad

1,3945 gold badges23 silver badges42 bronze badges

1

Some users are unable to start MySQL in XAMPP. According to them, every time they start MySQL in XAMPP, they receive an error message that says “Error: MySQL shutdown unexpectedly.” The most common cause of this problem is the corrupted database files of XAMPP. If you are experiencing such an issue with MySQL, the suggestions provided in this post may help you fix the problem.

MySQL shutdown unexpectedly

Why does MySQL shutdown unexpectedly?

It is necessary to stop MySQL before exiting XAMPP. If you exit XAMPP without stopping MySQL, it may corrupt the MySQL data files. Due to this, you may experience several problems with MySQL, like the shutting down of MySQL unexpectedly. If you are experiencing such a problem, it might be possible that the MySQL data files on your system are corrupted. We have described some troubleshooting methods that may help you get rid of this problem.

Try the following solutions to fix the issue. Before you proceed, we recommend you create a backup of the XAMPP folder. For this, copy the XAMPP folder and paste it into another partition of your hard drive or your external hard drive.

  1. Launch XAMPP as administrator
  2. Repair MySQL Database
  3. Modify the my.ini file
  4. Delete all the files inside the Data folder
  5. Rename the aria_log_control file
  6. Stop all the SQL services and start them again
  7. Copy the files from the Backup folder to the Data folder
  8. Delete the INFO file(s) from the Data folder
  9. Rename the Data folder and copy the ibdata1 file to the Data folder
  10. Uninstall and reinstall Xampp

Let’s see all these solutions in detail. Before trying every method written below, make sure that you have closed XAMPP properly.

1] Launch XAMPP as administrator

It is recommended to always launch XAMPP as an administrator to avoid data file corruption. Launch XAMPP as administrator and see if it fixes the problem. If this helps, you will save time on other troubleshooting methods. To launch XAMPP as administrator, follow the steps below:

  1. Click on Windows Search and type XAMPP.
  2. Right-click on XAMPP and select Run as Administrator.
  3. Click Yes if you receive the UAC prompt.

You can also set XAMPP to always run as administrator.

2] Repair MySQL Database

As described above in this article, the main cause of this problem is the corruption in XAMPP data files. If the problem is occurring on your computer due to this issue, repairing the MySQL database can fix the issue. The steps to repair the MySQL database are given below:

Click on Windows Search and type PowerShell. Select Windows PowerShell from the Search Results.

Type the following command and press Enter.

mysqld --console --skip-grant-tables --skip-external-locking

The above command will start the MySQL server without loading the grant tables. When the above command is executed successfully, type the following command and press Enter.

mysqlcheck -r --databases mysql --use-frm

The above command will repair the MySQL database. After the above commands are executed successfully, check if the issue persists.

3] Modify the my.ini file

Changing the port by modifying the my.ini file has fixed the issue for some users. You can also try this. Open the my.ini file and change the port 3306 to something else. By default, the my.ini file is located at the following location:

C:xamppmysqlbin

Location of my.ini file in XAMPP

  1. Open the File Explorer.
  2. Copy the above path and paste it into the address bar of File Explorer. After that hit Enter.
  3. Now, scroll down and locate the my.ini file.
  4. Once you find it, right-click on it and select “Open with > Notepad.”

If you do not find the my.ini file at the above-mentioned location, you can follow the instructions mentioned below.

modify my.ini file

  1. Click on Windows Search and type XAMPP.
  2. Right-click on XAMPP from the search results and select Run as Administrator.
  3. Click Yes in the UAC prompt. This will open the XAMPP Control panel.
  4. Click on the Config button next to MySQL and select my.ini. This will open the my.ini file in your default text editor software.

Replace 3306 with another port number

After opening the my.ini file in Notepad, press the Ctrl + F keys and type 3306. Replace any of the 3306 ports with a different port number. You can enter any random port number, like 3307, 3308, etc. For some users, replacing the 3306 port with 2811 fixed the issue.

Save the my.ini file and close Notepad. Restart your computer and then launch XAMPP. Check if the issue is fixed. If this does not work, revert the changes that you have made in the my.ini file and try the next solution.

4] Delete all the files inside the Data folder

If the above solution did not fix your problem, revert the changes in the my.ini file that you have just made. Now, open the File Explorer and go to the following path:

C:xamppmysqldata

Delete all the files inside Data foldrr

The above path opens the Data folder directly. Now, delete all the files except the folders. After deleting the files inside the Data folder, go to the following path in File Explorer:

C:xamppmysqlbin

Edit my.ini file

Locate the my.ini file and open it with Notepad. Now, type port=8111 just below port=3306 (as shown in the screenshot above). Press the Ctrl + S keys to save the changes you made in the my.ini file and close Notepad. Now, run XAMPP as administrator and start MySQL. The problem should not occur this time.

5] Rename the aria_log_control file

If the above solution did not fix your problem, Open the XAMPP folder that you copied on your external hard drive or on another hard drive partition and copy all the contents inside it. Now, open the XAMPP on your C drive and paste the copied content there. Replace the files and folders if you will be asked to do so. Now, go to the following path:

C:xamppmysqldata

Rename the aria_log_control file

Rename aria_log_control to aria_log_control_old and launch XAMPP. Start MySQL and see if this brings any changes. If this does not help, revert the changes and try the next solution.

Read: Best free Xampp Server alternatives for developers.

6] Stop all the SQL services and start them again

Restarting the SQL services has fixed the issue of some users. This method may work for you too. Open the Services app and stop all the SQL services and start them again. The steps to do this are written below:

Restart all SQL services

  1. Press the Win + R keys. This will launch the Run command box.
  2. Type services.msc and click OK. The Service Management window will appear.
  3. In the Services app, scroll down and locate the SQL services. You may find more than one SQL service on your computer.
  4. Stop all the SQL services. For this, right-click on SQL service and select Stop.
  5. Now, right-click again on the SQL services and select Start.

After restarting the SQL services, close the Services app and launch XAMPP as administrator. Start MySQL and see if the error occurs again.

7] Copy the files from the Backup folder to the Data folder

Another effective solution to fix this problem is to copy all the data inside the Backup folder and paste it into the Data folder. To do so, first, copy the below path and paste it into the address bar of the File Explorer. After that press Enter.

C:xamppmysqlbackup

This will open the Backup folder of XAMPP in your C directory. Now, copy all the data from there and go to the following path:

C:xamppmysqldata

Paste the copied data there. If you are prompted to replace the files, select Yes. Launch XAMPP as administrator and check if you can start MySQL this time. If not, try the next solution.

8] Delete the INFO file(s) from the Data folder

If the problem still persists, delete the INFO file and check if it helps. The INFO file(s) is/are located at the following location on your C drive.

C:xamppmysqldata

Delete the INFO files

Whether there is one or more than one INFO file at the above location, you have to delete all of them. After deleting the INFO file(s), launch XAMPP and start MySQL. MySQL should start without giving any error.

If this does not work, copy all the files from the XAMPP folder that you have created as a backup on your external hard drive or on another hard drive partition and paste the copied files inside the XAMPP folder on your C drive. Replace the files and folders if you are asked to do so.

9] Rename the Data folder and copy the ibdata1 file to the Data folder

This solution has helped a lot of users. If the above solutions did not fix your problem, this method should work for you. Rename the Data folder and copy the ibdata1 file to the Data folder. The process to do this is explained below.

  1. Open the XAMPP folder located on your C drive.
  2. Now, open the mysql folder.
  3. Rename the data folder to data_old.
  4. Copy the backup folder on another partition of your hard drive or on an external hard drive. Now, rename the backup folder located inside the mysql folder on your C drive to data.
  5. Open the data_old folder and copy all the database folders inside it and the ibdata1 file. Do not copy the mysql, performance_schema, and phpmyadmin folders. Now, open the data folder (which was actually the backup folder earlier) and paste the copied data there. Replace the files if you are asked to do so.
  6. Launch XAMPP Control Panel and start mysql.

10] Uninstall and reinstall XAMPP

If all the above solutions failed to fix your problem, uninstall and reinstall XAMPP. You can uninstall XAMPP from the Control Panel or from Windows 11/10 Settings. After uninstalling Xampp, download its latest version from the official website of Apache and install it again.

Read: How to increase phpMyAdmin upload size on XAMPP.

What to do if MySQL is not opening in XAMPP?

You may experience problems with XAMPP if you install it in another location instead of its default location. The default location to install XAMPP is c:xampp. Therefore, if you have installed XAMPP on another location, uninstall it and install it on its default location. If you have installed XAMPP on its default location but still MySQL is not opening or running in XAMPP, open the Services app in Windows 11/10 and stop all SQL services and start them again.

Another effective solution to fix this problem is to change the port 3306 to 3308. To do this, you have to edit the my.ini file, which is located at the following location:

C:xamppmysqlbin

Hope this helps.

Read next: Apache is not starting from XAMPP Control Panel in Windows 11/10.

If you use a local development environment, you may run into problems that are similar to those on a live server. In some cases, your WordPress website may be unable to connect with its database because MySQL isn’t running or it shut down unexpectedly.

Depending on which local environment you use, the process of troubleshooting your MySQL database might vary a bit. With XAMPP, the process is remarkably straightforward since you get access to a control panel instead of having to rely on the command line only.

In this article, we’ll explain what XAMPP is and what the “MySQL shutdown unexpectedly” error means. Then we’ll walk you through three methods you can use to fix it. Let’s get to it!

An Introduction to XAMPP

XAMPP is a free, PHP development environment that you can use for Windows, macOS, or Linux. It is a collection of software that enables you to host websites locally by mimicking the functions of a live server:

The XAMPP website.

The XAMPP website.

Using XAMPP, you can install all the software you need to run WordPress locally using a single bundle, rather than setting up each element individually. Development environments differ in what software they bundle.

With XAMPP, the components that you get include:

  • Apache: This is arguably the most popular web server software in the world, and it enables you to host sites.
  • MariaDB: This open-source database software enables you to manage databases.
  • PHP: WordPress is built on PHP, which means you need a PHP install to run the Content Management System (CMS).
  • Perl: Although WordPress doesn’t use the Perl programming language, it comes as part of the XAMPP stack by default.

On top of setting up the software you need to run WordPress, XAMPP provides you with a simple control panel:

The XAMPP control panel.

The XAMPP control panel.

This enables you to access logs for each of XAMPP’s components. It includes an overview log that shows you everything that’s happening in the background of your environment.

However, using a local development distribution doesn’t mean your server isn’t susceptible to errors. In some cases, the software components may malfunction, such as with the XAMPP error “MySQL shutdown unexpectedly”.

What Is the XAMPP Error “MySQL Shutdown Unexpectedly”?

As the name of the error implies, this is the message you’ll see if the MySQL software on your environment shuts down or ceases to function unexpectedly:

The XAMPP error “MySQL shutdown unexpectedly”.

The XAMPP error “MySQL shutdown unexpectedly”.

We say “unexpectedly”, because you can manually shut down the MySQL database software at any point. That also happens when you restart your server.

However, when the software is shut down, your website won’t be able to connect to its database. In other words, WordPress won’t work.

As you can see in the above image, XAMPP provides you with advice on troubleshooting the “MySQL shutdown unexpectedly error” right within its events log. In the next section, we’ll go into more detail on the various ways you can use to fix this issue.

How to Fix the XAMPP Error “MySQL Shutdown Unexpectedly” (3 Methods)?

Typically, fixing the XAMPP error “MySQL shutdown unexpectedly” is quick and easy. Below, we’ll walk you through three fixes, starting with the simplest.

1. Run XAMPP Using Administrator Privileges

Often, XAMPP produces errors when you don’t run the software using administrator privileges. This is because its components may not be able to function or configure properly at lower permission levels.

If you’re unsure whether that’s the case with your setup, we recommend that you close XAMPP altogether, and then restart the environment as an administrator. To do so in Windows, find the folder where you installed XAMPP and locate the xampp-control file. Next, right-click on that file and select Run as administrator:

Launching XAMPP with administrative privileges.

Launching XAMPP with administrative privileges.

If you’re a macOS user, you can right-click on the folder, and then select Get Info. In the pop-up window that opens, navigate to the Sharing & Permissions section, click on the padlock icon, and enter your administrator password. Change the Read & Write permission settings to Everyone.

Once XAMPP is up and each of its components is running, MySQL should function correctly. That means your database will be accessible.

2. Restore Your Database Backup

If restarting XAMPP with administrator privileges doesn’t solve the problem with your database, the next step is to restore its backup. XAMPP automatically creates backups for your environment’s software, which you can access within the folder where you installed it.

By default, your XAMPP MySQL backup files should be under Local Disk > XAMPP > MySQL. Inside that directory, you’ll see several folders, two of which are called data and backup:

XAMPP’s MySQL directory.

XAMPP’s MySQL directory.

The data folder includes all of the files that your database uses. The backup folder contains a single recent copy of your MySQL.

You can make a backup by clicking on the Stop button to the right of the MySQL option on the main menu:

Using the XAMPP control panel.

Using the XAMPP control panel.

Once you stop MySQL, return to XAMPP’s MySQL folder and follow these steps to restore the MySQL backup:

  1. Make a copy of the data folder.
  2. Rename this new folder copy to something like data-old. This will be your backup.
  3. Copy the contents of the backup folder into the data folder.

That’s it! To play it safe, though, we strongly recommend that you keep the data-old folder around until you make sure everything is working properly.

At this stage, you can return to the XAMPP control panel to restart MySQL, which should be running correctly now.

3. Change Your MySQL Port

One of the most common causes of the XAMPP error “MySQL shutdown unexpectedly” is another software using the port assigned to MySQL. By default, it tends to be 3306. To be certain, you can select the Netstat module from XAMPP’s control panel, right above the Shell tool:

Using XAMPP’s Netstat tool.

Using XAMPP’s Netstat tool.

Netstat is a command line tool that can show you active connections on your network, including which ports they’re using. Once you initialize Netstat, you’ll be able to see what port each tool in your stack is using, including MySQL.

Checking active connections using Netstat.

Checking active connections using Netstat.

If a conflict with that port caused the shutdown, restoring a backup or running MySQL with administrator privileges won’t make a difference. The only way to solve this issue is to change the port that MySQL uses. Thanks to Netstat, you can see what that port is and which other ones are in use.

To do so, go ahead and stop the service, using the same process we showed you in the last section. Next, click on the Config button next to MySQLon XAMPP’s main menu, and then select the my.ini option:

Accessing MySQL’s config file.

Accessing MySQL’s config file.

The my.ini file contains the MySQL configuration settings. After you click on it, XAMPP will open the file using your default text editor. Once you’re in, look for the line that reads Port, which specifies the port number that MySQL uses.

Here, you can change that port number to another option that you know other programs aren’t using. In most cases, we recommend using 3307, which should be available. Save your changes and close the my.ini file.

You can then use the XAMPP control panel to restart MySQL. Hopefully, your database is now working as it should. If for some reason, XAMPP can’t connect to your database using the new port that you set, it will let you know through the control panel’s log. In that case, you might try using a different port instead.

Summary

If you use XAMPP to run WordPress locally, you may encounter the occasional error with your server’s configuration. One of the most common issues is MySQL shutting down unexpectedly.

The good news is that, if this does happen, there are three methods you can use to troubleshoot the issue:

  1. Run XAMPP using administrator privileges.
  2. Restore your database backup.
  3. Change your MySQL port.

If you enjoyed this XAMPP tutorial, be sure to check out DevKinsta as well. DevKinsta is our free local development tool that lets you quickly spin up WordPress sites with customizable PHP settings, HTTPS support, built-in email and database management, and more. DevKinsta also features full integration with MyKinsta, but you don’t have to be a Kinsta customer to integrate DevKinsta into your workflow.


Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275+ PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

Asked
6 years, 7 months ago

Viewed
205 times

When i am trying to start mysql on xampp server, it is not responding. It has the following error on log file. Any help will be appreciated. Apache Server is running fine though. Thanks

2016-06-21 10:49:15 5756 [Note] Plugin 'FEDERATED' is disabled.
2016-06-21 10:49:15 150c 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-06-21 10:49:15 5756 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-06-21 10:49:15 5756 [Note] InnoDB: The InnoDB memory heap is disabled
2016-06-21 10:49:15 5756 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-06-21 10:49:15 5756 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-06-21 10:49:15 5756 [Note] InnoDB: Not using CPU crc32 instructions
2016-06-21 10:49:15 5756 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2016-06-21 10:49:15 5756 [Note] InnoDB: Completed initialization of buffer pool
2016-06-21 10:49:15 5756 [Note] InnoDB: Highest supported file format is Barracuda.
2016-06-21 10:49:15 5756 [Note] InnoDB: Log scan progressed past the checkpoint lsn 49463
2016-06-21 10:49:15 5756 [Note] InnoDB: Database was not shutdown normally!
2016-06-21 10:49:15 5756 [Note] InnoDB: Starting crash recovery.
2016-06-21 10:49:15 5756 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-06-21 10:49:18 5756 [Note] InnoDB: Restoring possible half-written data pages 
2016-06-21 10:49:18 5756 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1600624
2016-06-21 10:49:20 5756 [Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
2016-06-21 10:49:21 5756 [Note] InnoDB: 128 rollback segment(s) are active.
2016-06-21 10:49:22 5756 [Note] InnoDB: Waiting for purge to start
2016-06-21 10:49:22 5756 [Note] InnoDB: 5.6.16 started; log sequence number 1600624
2016-06-21 10:49:22 5756 [Note] Server hostname (bind-address): '*'; port: 3306
2016-06-21 10:49:22 5756 [Note] IPv6 is available.

2016-06-21 10:49:22 5756 [Note]   - '::' resolves to '::';

2016-06-21 10:49:22 5756 [Note] Server socket created on IP: '::'.

asked Jun 21, 2016 at 4:57

Sohel0415's user avatar

1

Asked
6 years, 7 months ago

Viewed
205 times

When i am trying to start mysql on xampp server, it is not responding. It has the following error on log file. Any help will be appreciated. Apache Server is running fine though. Thanks

2016-06-21 10:49:15 5756 [Note] Plugin 'FEDERATED' is disabled.
2016-06-21 10:49:15 150c 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-06-21 10:49:15 5756 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-06-21 10:49:15 5756 [Note] InnoDB: The InnoDB memory heap is disabled
2016-06-21 10:49:15 5756 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-06-21 10:49:15 5756 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-06-21 10:49:15 5756 [Note] InnoDB: Not using CPU crc32 instructions
2016-06-21 10:49:15 5756 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2016-06-21 10:49:15 5756 [Note] InnoDB: Completed initialization of buffer pool
2016-06-21 10:49:15 5756 [Note] InnoDB: Highest supported file format is Barracuda.
2016-06-21 10:49:15 5756 [Note] InnoDB: Log scan progressed past the checkpoint lsn 49463
2016-06-21 10:49:15 5756 [Note] InnoDB: Database was not shutdown normally!
2016-06-21 10:49:15 5756 [Note] InnoDB: Starting crash recovery.
2016-06-21 10:49:15 5756 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-06-21 10:49:18 5756 [Note] InnoDB: Restoring possible half-written data pages 
2016-06-21 10:49:18 5756 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1600624
2016-06-21 10:49:20 5756 [Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
2016-06-21 10:49:21 5756 [Note] InnoDB: 128 rollback segment(s) are active.
2016-06-21 10:49:22 5756 [Note] InnoDB: Waiting for purge to start
2016-06-21 10:49:22 5756 [Note] InnoDB: 5.6.16 started; log sequence number 1600624
2016-06-21 10:49:22 5756 [Note] Server hostname (bind-address): '*'; port: 3306
2016-06-21 10:49:22 5756 [Note] IPv6 is available.

2016-06-21 10:49:22 5756 [Note]   - '::' resolves to '::';

2016-06-21 10:49:22 5756 [Note] Server socket created on IP: '::'.

asked Jun 21, 2016 at 4:57

Sohel0415's user avatar

1

Users working on the MySQL platform encounter an error called “Error: MySQL shutdown unexpectedly”. Issues in the database and corrupted files are some of the reasons behind this error. So, removing these corrupted files will fix this issue.

You might face this error while starting the XAMPP control panel and the Apache module. In this post, we will find a way to resolve this issue.

Cause of “Error: MySQL Shutdown Unexpectedly” in XAMPP

Apart from corrupted files, improper database shut down, missing files and port changes can also cause this error. When you run MySQL in a webserver, the corrupted files in the mysql/data folder cause MySQL to shut down.

This is what the error looks like – 

Error: MySQL shutdown unexpectedly.

This may be due to a blocked port, missing dependencies,

improper privileges, a crash, or a shutdown by another method.

Press the Logs button to view error logs and check

the Windows Event Viewer for more clues

If you need more help, copy and post this

entire log window on the forums

Error: MySQL shutdown unexpectedly in XAMPP

Error log

xamppmysqldatamysql_error.log 

InnoDB: Mutexes and rw_locks use Windows interlocked functions

InnoDB: Uses event mutexes

InnoDB: Compressed tables use zlib 1.2.11

InnoDB: Number of pools: 1

InnoDB: Using SSE2 crc32 instructions

InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M

InnoDB: Completed initialization of buffer pool

InnoDB: 128 out of 128 rollback segments are active.

InnoDB: Creating shared tablespace for temporary tables

InnoDB: Setting file 'xamppmysqldataibtmp1' size to 12 MB. Physically writing the file full; Please wait ...

InnoDB: File 'xamppmysqldataibtmp1' size is now 12 MB.

InnoDB: Waiting for purge to start

InnoDB: 10.4.11 started; log sequence number 47134; transaction id 9

InnoDB: Loading buffer pool(s) from E:xamppmysqldataib_buffer_pool

Plugin 'FEEDBACK' is disabled.

InnoDB: Buffer pool(s) load completed at 201018 18:42:04

Server socket created on IP: '::'.

Steps to fix this problem – 

  • Stop the XAMPP server, MySQL and Apache
  • Create a backup of the “/xampp/mysql/data” folder using a compression software
  • Rename the “/xampp/mysql/data” folder to “/xampp/mysql/data-old”
  • Create a new folder and name it “/xampp/mysql/data”
  • Copy all folders from the “/xampp/mysql/backup” and paste it to the “/xampp/mysql/data” folder, which you have just created
  • Copy all the databases from the “/xampp/mysql/data-old” folder and paste it to the “/xampp/mysql/data” folder
  • Finally copy the “ibdata1” and all of the log files including “ib_logfile0, ib_logfile1 ” from “/xampp/mysql/data-old” and paste it to the “/xampp/mysql/data” folder
  • Start MySQL from the XAMPP control panel
  • Go to phpMyAdmin to check if all the databases are available and running properly

Solution for Error: MySQL shutdown unexpectedly in XAMPP

While undergoing this process make sure you backup all your data in a secure place.

Некоторые пользователи не могут запустить MySQL в XAMPP. По их словам, каждый раз, когда они запускают MySQL в XAMPP, они получают сообщение об ошибке, в котором говорится: «MySQL shutdown unexpectedly». Наиболее распространенной причиной этой проблемы являются поврежденные файлы базы данных XAMPP. Если у вас возникла такая проблема с MySQL, советы, представленные в этом посте, могут помочь вам решить проблему.

Неожиданное завершение работы MySQL

Перед выходом из XAMPP необходимо остановить MySQL. Если вы выйдете из XAMPP без остановки MySQL, это может привести к повреждению файлов данных MySQL. Из-за этого у вас могут возникнуть некоторые проблемы с MySQL, такие как неожиданное завершение работы MySQL. Если у вас возникла такая проблема, возможно, файлы данных MySQL в вашей системе повреждены. Мы описали некоторые методы устранения неполадок, которые могут помочь вам избавиться от этой проблемы.

Ошибка: неожиданное завершение работы MySQL

Попробуйте следующие решения, чтобы устранить проблему. Прежде чем продолжить, мы рекомендуем вам создать резервную копию папки XAMPP. Для этого скопируйте папку XAMPP и вставьте ее в другой раздел вашего жесткого диска или на внешний жесткий диск.

Давайте посмотрим на все эти решения в деталях. Прежде чем пробовать каждый метод, описанный ниже, убедитесь, что вы правильно закрыли XAMPP.

Запустите XAMPP от имени администратора

Рекомендуется всегда запускать XAMPP от имени администратора, чтобы избежать повреждения файла данных. Запустите XAMPP от имени администратора и посмотрите, решит ли это проблему. Если это поможет, вы сэкономите время на других методах устранения неполадок. Чтобы запустить XAMPP от имени администратора, выполните следующие действия:

  1. Нажмите «Поиск Windows» и введите XAMPP.
  2. Щелкните правой кнопкой мыши XAMPP и выберите «Запуск от имени администратора» .
  3. Нажмите « Да», если вы получили приглашение UAC.

Восстановить базу данных MySQL

Как описано выше в этой статье, основной причиной этой проблемы является повреждение файлов данных XAMPP. Если проблема возникает на вашем компьютере из-за этой проблемы, восстановление базы данных MySQL может решить проблему. Шаги по восстановлению базы данных MySQL приведены ниже:

Щелкните Поиск Windows и введите PowerShell. Выберите Windows PowerShell в результатах поиска.

Введите следующую команду: mysqld --console --skip-grant-tables --skip-external-locking и нажмите Enter.

Приведенная выше команда запустит сервер MySQL без загрузки таблиц грантов. Когда указанная выше команда будет выполнена успешно, введите следующую команду: mysqlcheck -r --databases mysql --use-frm и нажмите Enter.

Приведенная выше команда восстановит базу данных MySQL. После успешного выполнения вышеуказанных команд проверьте, сохраняется ли проблема.

Измените файл my.ini

Изменение порта путем изменения файла my.ini устранило проблему для некоторых пользователей. Вы также можете попробовать это. Откройте файл my.ini и измените порт 3306 на другой. По умолчанию файл my.ini находится в следующем месте: C:xamppmysqlbin

Расположение файла my.ini в XAMPP
  1. Откройте Проводник.
  2. Скопируйте указанный выше путь и вставьте его в адресную строку Проводника. После этого нажмите Enter.
  3. Теперь прокрутите вниз и найдите файл my.ini.
  4. Как только вы найдете его, щелкните его правой кнопкой мыши и выберите «Открыть с помощью > Блокнот».

Если вы не найдете файл my.ini в указанном выше месте, вы можете следовать приведенным ниже инструкциям.

изменить файл my.ini
  1. Нажмите «Поиск Windows» и введите XAMPP.
  2. Щелкните правой кнопкой мыши XAMPP в результатах поиска и выберите «Запуск от имени администратора» .
  3. Нажмите «Да» в приглашении UAC. Это откроет панель управления XAMPP.
  4. Нажмите кнопку Config рядом с MySQL и выберите my.ini . Это откроет файл my.ini в текстовом редакторе по умолчанию.
Замените 3306 другим номером порта

После открытия файла my.ini в Блокноте нажмите клавиши Ctrl + F и введите 3306. Замените любой из портов 3306 другим номером порта. Вы можете ввести любой случайный номер порта, например 3307, 3308 и т. д. Для некоторых пользователей проблема устранена заменой порта 3306 на 2811.

  1. Сохраните файл my.ini и закройте Блокнот. 
  2. Перезагрузите компьютер и запустите XAMPP. 
  3. Проверьте, устранена ли проблема. 

Если это не сработает, отмените изменения, внесенные в файл my.ini, и попробуйте следующее решение.

Удалите все файлы в папке «Данные»

Если приведенное выше решение не устранило вашу проблему, отмените изменения в файле my.ini, которые вы только что внесли. Теперь откройте проводник и перейдите по следующему пути: C:xamppmysqlданные

Удалите все файлы внутри папки Data

Приведенный выше путь открывает папку данных напрямую. Теперь удалите все файлы, кроме папок. После удаления файлов в папке Data перейдите по следующему пути в проводнике:

C:xamppmysqlbin
Отредактируйте файл my.ini

Найдите файл my.ini и откройте его с помощью Блокнота. Теперь введите port=8111 чуть ниже port=3306 (как показано на снимке экрана выше). Нажмите клавиши Ctrl + S , чтобы сохранить изменения, внесенные в файл my.ini, и закройте Блокнот. Теперь запустите XAMPP от имени администратора и запустите MySQL. На этот раз проблема не должна возникнуть.

Переименуйте файл aria_log_control.

Если приведенное выше решение не устранило вашу проблему, откройте папку XAMPP, которую вы скопировали на внешний жесткий диск или в другой раздел жесткого диска, и скопируйте все содержимое внутри нее. Теперь откройте XAMPP на диске C и вставьте туда скопированное содержимое. Замените файлы и папки, если вас попросят это сделать. Теперь перейдите по следующему пути: C:xamppmysqldata

Переименуйте файл aria_log_control.

Переименуйте aria_log_control в aria_log_control_old и запустите XAMPP. Запустите MySQL и посмотрите, внесет ли это какие-либо изменения. Если это не поможет, отмените изменения и попробуйте следующее решение.

Остановите все службы SQL и запустите их снова

Перезапуск служб SQL устранил проблему некоторых пользователей. Этот метод может работать и для вас. Откройте приложение «Службы», остановите все службы SQL и запустите их снова. Шаги для этого написаны ниже:

  1. Нажмите клавиши Win+R  Это запустит окно команды «Выполнить».
  2. Введите services.mscи нажмите ОК. Появится окно управления услугами.
  3. В приложении «Службы» прокрутите вниз и найдите службы SQL. На вашем компьютере может быть несколько служб SQL.
  4. Остановите все службы SQL. Для этого щелкните правой кнопкой мыши службу SQL и выберите «Остановить».
  5. Теперь снова щелкните правой кнопкой мыши службы SQL и выберите «Пуск».
Перезапустите все службы SQL.

После перезапуска служб SQL закройте приложение «Службы» и запустите XAMPP от имени администратора. Запустите MySQL и посмотрите, возникает ли ошибка снова.

Скопируйте файлы из папки резервного копирования в папку данных

Еще одно эффективное решение этой проблемы — скопировать все данные из папки «Резервное копирование» и вставить их в папку «Данные». Для этого сначала скопируйте указанный ниже путь и вставьте его в адресную строку Проводника. После этого нажмите Enter.

C:xamppmysqlbackup

Это откроет папку резервного копирования XAMPP в вашем каталоге C. Теперь скопируйте оттуда все данные и перейдите по следующему пути:

C:xamppmysqldata

Вставьте туда скопированные данные. Если вам будет предложено заменить файлы, выберите Да. Запустите XAMPP от имени администратора и проверьте, можете ли вы запустить MySQL на этот раз. Если нет, попробуйте следующее решение.

Удалите файлы INFO из папки данных

Если проблема не устранена, удалите файл INFO и проверьте, помогает ли он. Файлы INFO находятся в следующем месте на вашем диске C:xamppmysqlbackup

Удалите файлы INFO

Независимо от того, есть ли в указанном выше месте один или несколько файлов INFO, вы должны удалить их все. После удаления файлов INFO запустите XAMPP и запустите MySQL. MySQL должен запуститься без каких-либо ошибок.

Если это не сработает, скопируйте все файлы из папки XAMPP, которую вы создали в качестве резервной копии, на внешний жесткий диск или в другой раздел жесткого диска и вставьте скопированные файлы в папку XAMPP на диске C. Замените файлы и папки, если вас об этом попросят.

Переименуйте папку Data и скопируйте файл ibdata1 в папку Data

Это решение помогло многим пользователям. Если приведенные выше решения не помогли решить вашу проблему, этот метод должен вам помочь. Переименуйте папку Data и скопируйте файл ibdata1 в папку Data. Процесс, как это сделать, описан ниже:

  1. Откройте папку XAMPP, расположенную на диске C.
  2. Теперь откройте папку mysql.
  3. Переименуйте папку данных в data_old.
  4. Скопируйте папку резервной копии на другой раздел жесткого диска или на внешний жесткий диск. Теперь переименуйте папку резервной копии, расположенную внутри папки mysql на диске C, в data.
  5. Откройте папку data_old и скопируйте в нее все папки базы данных и файл ibdata1. Не копируйте папки mysqlperformance_schema и phpmyadmin
  6. Теперь откройте папку данных (которая раньше была папкой резервной копии) и вставьте туда скопированные данные. Замените файлы, если вас об этом попросят.
  7. Запустите панель управления XAMPP и запустите mysql.

Удалите и переустановите XAMPP

Если все вышеперечисленные решения не помогли решить вашу проблему, удалите и переустановите XAMPP. Вы можете удалить XAMPP из панели управления или из настроек Windows 11/10. После удаления Xampp загрузите его последнюю версию с официального сайта Apache и установите снова.

Что делать, если MySQL не открывается в XAMPP?

У вас могут возникнуть проблемы с XAMPP, если вы установите его в другом месте, а не в месте по умолчанию. Расположение по умолчанию для установки XAMPP — c:xampp. Поэтому, если вы установили XAMPP в другом месте, удалите его и установите в место по умолчанию. Если вы установили XAMPP в расположение по умолчанию, но MySQL по-прежнему не открывается или не работает в XAMPP, откройте приложение «Службы» в Windows 11/10, остановите все службы SQL и запустите их снова.

Другим эффективным решением этой проблемы является изменение порта 3306 на 3308. Для этого вам необходимо отредактировать файл my.ini, который находится по следующему адресу: C:xamppmysqlbin.

Надеюсь это поможет.

Я только что установил XAMPP для Windows — должна быть самая новая версия (XAMPP Control Panel v3.2.1).

Apache работает отлично на портах 80 и 443, но MySQL не запускается. Когда я нажимаю кнопку запуска, я получаю это сообщение:

Попытка запуска службы MySQL…

Затем появляется окно и спрашивает меня, хочу ли я разрешить это, чего я хочу. Но после этого ничего не происходит. Я могу нажать столько раз, сколько хочу, но с тем же результатом.

Что я могу сделать с MySQL?

Ответ 1

Измените порт MySQL с 3306 на 3307 или что-то в этом роде.

http://silentlyrun.blogspot.in/2013/02/how-to-change-apache-n-mysql-port-for.html

Надеюсь, это поможет!

Ответ 2

Если вы уже установили MySQL в своих окнах, перейдите в файл services.msc на своих окнах и щелкните правой кнопкой мыши файл MySQL и остановите службу, теперь откройте свой XAMPP и запустите MySQL. Теперь MySQL запустится на порт 3306.

Ответ 3

У меня была проблема с этим, потому что я случайно установил XAMPP в c:windowsprogram files (x86), что вызвало проблему с разрешениями Windows.

В установке говорится, что не устанавливать его там, но я думал, что он сказал, чтобы установить его там.

Я удалил и переустановил на c:xampp, и он сработал.

Ответ 4

Только остановить My sql В Xampp за 15 минут После 15 минут перезапуска Mysql. Если мой sql работает, но порт не отображается в Xampp, а затем нажмите «Config» > my.ini отредактируйте этот файл и измените порт 3306 > 3307 и сохраните и перезапустите xampp………

Ответ 5

Одна из многих причин заключается в том, что xampp не может запускать службу MySQL сам по себе. Все, что вам нужно сделать, — запустить службу mySQL вручную.

Во-первых, убедитесь, что « mysqld.exe» не запущен, если есть, завершите его. (перейдите в Диспетчер задач > вкладка «Прогресс» > щелкните правой кнопкой мыши «mysqld.exe» > конечная задача)

Откройте службу services.msc с помощью Запустить (нажмите «Окно + R» ) > services.msc или На панели управления XAMPP нажмите кнопку «Сервисы» .
Найдите « MySQL«, щелкните правой кнопкой мыши и запустите его.

Ответ 6

После Stop xampp перейдите к настройке и измените порт 3306 на 3308 mysql и сохраните. Теперь запустите sql…… Наслаждайтесь

Ответ 7

Была эта проблема сегодня, на компьютере с Windows 10. Открыл C:xamppdatamysql_error.log и искал строки, содержащие [ERROR].

Последняя строка ошибки была:

... [ERROR] InnoDB: File (unknown): 'close' returned OS error 206. Cannot continue operation

Важное примечание: если ваша ошибка отличается, отправьте ее в Google (скорее всего, вы найдете исправление).

В поиске вышеуказанной ошибки нашел эту ветку на форуме поддержки Apache Friends, которая привела меня к исправлению:

  1. Откройте C:xamppmysqlbinmy.ini и добавьте следующую строку в конец раздела [mysqld] (над строкой, содержащей ## UTF 8 Settings):
innodb_flush_method=normal
  1. Перезапустите службу MySQL. Должен работать просто отлично.

Ответ 8

Вы использовали путь установки по умолчанию?

В моем случае, когда я запустил mysql_start.bat, я получил следующую ошибку:

Can`t find messagefile 'D:xamppmysqlshareerrmsg.sys'

Я переместил папку xampp в корень диска и начал работать.

Надеюсь, что это поможет

Ответ 9

  1. В типе cmd: services.msc Найдите MySql и измените свойства на отключенные.
  2. В панели управления Xampp удалите MySql с помощью флажка слева и установите снова, щелкнув по тому же флажку.

Ответ 10

Если у вас есть другие тестовые приложения, такие как веб-пакет SQL и т.д., удалите их, потому что они работают в порту 3306.

Ответ 11

Я могу поделиться тем, как я решил проблему в моем случае.

Кажется, у меня был установлен MySQL Server 5.7. Он не показывался в списке «Установка и удаление программ» в Windows, поэтому я не знал об этом. Я отметил это после того, как посмотрел журнал XAMPP.

Сразу после запуска XAMPP он показал в журнале, что существует конфликт в mySQL, и указал папку, в которой установлен мой MySQL Server 5.7. Я удалил mySQL 5.7 вручную из Program Files (x86) и папки ProgramData, перезапустил, и тогда XAMPP mySQL запустился нормально.

Я пытался только остановить службу MySQL, но для меня это не сработало. Только ручное удаление всех папок mySQL 5.7, похоже, помогло.

Ответ 12

У меня точно такая же проблема. Наконец-то нашел решение:

Опция Relocate XAMPP в инструменте установки не правильно переместила пути и повредила их, но я вручную изменил каталоги внутри my.ini (base dir, data dir,…). После этого mysql начался успешно.

Ответ 13

Пользователи Windows 10:

У меня тоже была эта проблема. Небольшое расследование помогло, хотя. До этого у меня была проблема, что 3306 использовался. Итак, я узнал, что порт 3306 используется другой программой. В частности, программу JDBC, которую я пытался изучить, и у меня был установлен xammp, прежде чем я попробовал этот JDBC. Итак, я удалил весь файл, и вот я здесь, где вы находитесь. Проблема заключалась в том, что мой ‘ImagePath’ (переменная реестра) был изменен после повторной установки mySql. Проще говоря, xammp больше не знает, где находится ваш mysqld.exe, или файл находится не в том месте, в котором вы его указали. Вот как это исправить:

  1. Откройте run (Win + r) и введите «regedit». Здесь вы можете редактировать свой реестр.
  2. Перейдите к: HKEY_LOCAL_MACHINE> SYSTEM> CurrentControlSet> Службы> MySql

enter image description here

  1. Нажмите на mySql и обратите внимание на переменную ImagePath. Щелкните правой кнопкой мыши «ImagePath» и нажмите «Изменить».
  2. Введите местоположение своего файла xammp mySqld (найдите его в xammp), хотя он, вероятно, совпадает с моим.

Классные источники:

https://superuser.com/questions/222238/how-to-change-path-to-executable-for-a-windows-service/252850

https://dev.mysql.com/doc/mysql-windows-excerpt/5.7/en/mysql-installation-windows-path.html

 
Спасибо дэйв

Ответ 14

В Windows вы должны пойти: Пуск > Выполнить > services.msc > Apache 2.4 > Свойствa > Режим запускa > Автоматически > Применить > Пуск > OK > [То же, что и MySQL]

Понравилась статья? Поделить с друзьями:
  • Xampp как пользоваться на windows 10
  • Xampp windows 10 apache не запускается
  • Xampp portable скачать x64 windows 10
  • Xampp download windows 7 64 bit download
  • Xamarin testflight скачать на русском для windows 10