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
6,1914 gold badges39 silver badges52 bronze badges
asked Jan 22, 2014 at 9:52
5
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
1
I had an issue with this because I had accidentally installed XAMPP to c:\windows\program 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
EoinEoin
1,4132 gold badges17 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 kumarAlok kumar
811 silver badge1 bronze badge
- In the cmd type:
services.msc
Find MySql and change properties to the disabled. - 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
8,7237 gold badges26 silver badges48 bronze badges
answered Feb 10, 2019 at 13:29
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:
- Open run (Win + r) and type ‘regedit’. This is where you edit your registry.
- Navigate to: HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > MySql
- Click on mySql and notice the ImagePath variable. Right click ‘ImagePath’ and click modify.
- 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
desertnaut
57.7k27 gold badges140 silver badges167 bronze badges
answered Oct 4, 2019 at 23:07
ThomasThomas
2,6321 gold badge9 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
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
0
Only for windows
I have fixed the mysql startup issue by following below steps
Steps:
-
Open CMD and copy paste the command
netstat -ano | findstr 3306
If you get any result for command then the Port 3306 is active -
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
- For CMD-> search for cmd from start menu
- For Powershell-> search for powershell from start menu
answered Jan 24, 2020 at 11:20
Had this problem today, on a Windows 10 machine. Opened C:\xampp\data\mysql_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:
- Open
C:\xampp\mysql\bin\my.ini
and add the following line towards the end of[mysqld]
section (above the line containing## UTF 8 Settings
):
innodb_flush_method=normal
- Restart MySQL service. Should run just fine.
answered Dec 24, 2018 at 7:23
taotao
83.3k16 gold badges114 silver badges150 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
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
SAMProSAMPro
1,0681 gold badge15 silver badges39 bronze badges
I solved this problem by removing all the information in the path
C:\xampp\mysql\data
And copy the information inside this path
C:\xampp\mysql\backup
answered Jan 7 at 16:52
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:\xampp\mysql\share\errmsg.sys'
I moved my xampp folder to the root of the drive and it started working.
desertnaut
57.7k27 gold badges140 silver badges167 bronze badges
answered Feb 4, 2016 at 3:04
OltamorOltamor
1211 silver badge4 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
9,94511 gold badges33 silver badges43 bronze badges
answered Dec 12, 2018 at 21:53
radekradek
471 silver badge7 bronze badges
Everytime my MySQL starts, it will stop, then I noticed that some files are getting generated in C:\xampp\mysql\data. 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
BawmBawm
791 silver badge3 bronze badges
This worked for me.
- Search for Services in Windows Start
- Find MySQL in it.
- 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
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
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 KumarSunil Kumar
6,1506 gold badges36 silver badges40 bronze badges
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
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
AhmadAhmad
1,6185 gold badges24 silver badges46 bronze badges
1
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
6,1914 gold badges39 silver badges52 bronze badges
asked Jan 22, 2014 at 9:52
5
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
1
I had an issue with this because I had accidentally installed XAMPP to c:\windows\program 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
EoinEoin
1,4132 gold badges17 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 kumarAlok kumar
811 silver badge1 bronze badge
- In the cmd type:
services.msc
Find MySql and change properties to the disabled. - 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
8,7237 gold badges26 silver badges48 bronze badges
answered Feb 10, 2019 at 13:29
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:
- Open run (Win + r) and type ‘regedit’. This is where you edit your registry.
- Navigate to: HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > MySql
- Click on mySql and notice the ImagePath variable. Right click ‘ImagePath’ and click modify.
- 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
desertnaut
57.7k27 gold badges140 silver badges167 bronze badges
answered Oct 4, 2019 at 23:07
ThomasThomas
2,6321 gold badge9 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
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
0
Only for windows
I have fixed the mysql startup issue by following below steps
Steps:
-
Open CMD and copy paste the command
netstat -ano | findstr 3306
If you get any result for command then the Port 3306 is active -
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
- For CMD-> search for cmd from start menu
- For Powershell-> search for powershell from start menu
answered Jan 24, 2020 at 11:20
Had this problem today, on a Windows 10 machine. Opened C:\xampp\data\mysql_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:
- Open
C:\xampp\mysql\bin\my.ini
and add the following line towards the end of[mysqld]
section (above the line containing## UTF 8 Settings
):
innodb_flush_method=normal
- Restart MySQL service. Should run just fine.
answered Dec 24, 2018 at 7:23
taotao
83.3k16 gold badges114 silver badges150 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
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
SAMProSAMPro
1,0681 gold badge15 silver badges39 bronze badges
I solved this problem by removing all the information in the path
C:\xampp\mysql\data
And copy the information inside this path
C:\xampp\mysql\backup
answered Jan 7 at 16:52
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:\xampp\mysql\share\errmsg.sys'
I moved my xampp folder to the root of the drive and it started working.
desertnaut
57.7k27 gold badges140 silver badges167 bronze badges
answered Feb 4, 2016 at 3:04
OltamorOltamor
1211 silver badge4 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
9,94511 gold badges33 silver badges43 bronze badges
answered Dec 12, 2018 at 21:53
radekradek
471 silver badge7 bronze badges
Everytime my MySQL starts, it will stop, then I noticed that some files are getting generated in C:\xampp\mysql\data. 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
BawmBawm
791 silver badge3 bronze badges
This worked for me.
- Search for Services in Windows Start
- Find MySQL in it.
- 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
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
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 KumarSunil Kumar
6,1506 gold badges36 silver badges40 bronze badges
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
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
AhmadAhmad
1,6185 gold badges24 silver badges46 bronze badges
1
XAMPP is a great tool for web developers who need to host websites locally on their own computers. Unfortunately, because it uses ports and services that are commonly used by other applications, conflicts can happen, causing certain applications on XAMPP to be unable to run.
In this article, we will be exploring what you can do if XAMPP’s Apache service does not run on Windows.
Note that if you are using XAMPP on macOS, please refer to the following article instead.
If you prefer to watch a video as opposed to reading, we have a video on this as well:
- The problem
- Possible causes and fixes
- Port 3306 is already used by another process
- Changing the port used by XAMPP
- MySQL’s data has been corrupted
- Unable to access phpMyAdmin
- Conclusion
1. The problem
If your MySQL module’s status changes to back to stopped every time you try to start it, you are strongly encouraged to read on further to solve this problem.
Below is a transcription of the error log shown on XAMPP when MySQL fails to start:
[mysql] Attempting to start MySQL service...
[mysql] Status change detected: running
[mysql] Status change detected: stopped
[mysql] Error: MySQL shutdown unexpectedly
[mysql] This may be due to a blocked port, missing dependencies,
[mysql] improper priviliges, a crash, or a shutdown by another method.
2. Possible causes and fixes
Below are some common causes that prevent XAMPP’s MySQL module from starting.
a. Port 3306 is used by another process
The most likely reason that XAMPP’s MySQL service is unable to start is because port 3306 is already used by a different program that is currently running on your computer. By default, XAMPP’s MySQL service binds to port 3306 when started, and it can only do so if another program is not already using it.
To ascertain whether this is the case, you can click on the Netstat button to open up a window with a list of all the ports that are being used on your computer currently. If port 3306 is in the list when you haven’t started MySQL on XAMPP, this means that another program is using it.
To remedy this, you will need to find the process that is using port 3306 and end the process. In the example above, a process called mysqld.exe is using port 3306. To stop it, I will have to use Ctrl + Alt + Delete to open up the Task Manager, then find and end the mysqld.exe process.
Once this is done, you can try starting MySQL on XAMPP again. Depending on the program that was occupying port 3306, this might or might not work. If it doesn’t work, you will have to find the program that was creating the process and uninstall it. In most cases, this should be another installation of MySQL on your computer, such as:
- MySQL Workbench
- MySQL Community Server
…or some other variation of MySQL, since it is one of the few programs that use port 3306.
After uninstalling the other program(s), remember to restart your computer before trying to start MySQL again.
b. Changing the port used by XAMPP MySQL
If you don’t want to uninstall the program that is using port 3306, or if you can’t find the process using the instructions above, you can also configure XAMPP MySQL to use a different port. Do note that if another MySQL program is using port 3306, there is a chance that this doesn’t work, as 2 seperate installations of MySQL can interfere with each other.
Regardless, below are the steps to change the port of XAMPP’s MySQL:
- In the XAMPP control panel, click on the Config button of the MySQL module.
- In the popped window, select my.ini.
my.cnf
.- Inside the file, go down and find the section that contains the following line:
# The MySQL server
. Below this line, you should find the port number, which saysport=3306
by default. - Change to a different port. You can use any unused port on your computer between 1 to 65535, but I usually use port 3307.
- Save the changes to the file, and try to start MySQL on XAMPP again.
Article continues after the advertisement:
Below is a snapshot of my my.cnf
file, with the part that you need to change highlighted:
my.cnf
# Example MySQL config file for small systems. # # This is for a system with little memory (<= 64M) where MySQL is only used # from time to time and it's important that the mysqld daemon # doesn't use much resources. # # You can copy this file to # C:/xampp/mysql/bin/my.cnf to set global options, # mysql-data-dir/my.cnf to set server-specific options (in this # installation this directory is C:/xampp/mysql/data) or # ~/.my.cnf to set user-specific options. # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program # with the "--help" option. # The following options will be passed to all MySQL clients [client] # password = your_password port=3306 socket="C:/xampp/mysql/mysql.sock" # Here follows entries for some specific programs # The MySQL server default-character-set=utf8mb4 [mysqld] port=33063307 socket="C:/xampp/mysql/mysql.sock" basedir="C:/xampp/mysql" tmpdir="C:/xampp/tmp" datadir="C:/xampp/mysql/data" pid_file="mysql.pid" # enable-named-pipe key_buffer=16M max_allowed_packet=1M sort_buffer_size=512K net_buffer_length=8K read_buffer_size=256K read_rnd_buffer_size=512K myisam_sort_buffer_size=8M log_error="mysql_error.log" # Change here for bind listening # bind-address="127.0.0.1" # bind-address = ::1 # for ipv6 # Where do all the plugins live plugin_dir="C:/xampp/mysql/lib/plugin/" # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets or named pipes. # Note that using this option without enabling named pipes on Windows # (via the "enable-named-pipe" option) will render mysqld useless! # # commented in by lampp security #skip-networking #skip-federated # Replication Master Server (default) # binary logging is required for replication # log-bin deactivated by default since XAMPP 1.4.11 #log-bin=mysql-bin # required unique id between 1 and 2^32 - 1 # defaults to 1 if master-host is not set # but will not function as a master if omitted server-id =1 # Replication Slave (comment out master section to use this) # # To configure this host as a replication slave, you can choose between # two methods : # # 1) Use the CHANGE MASTER TO command (fully described in our manual) - # the syntax is: # # CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>, # MASTER_USER=<user>, MASTER_PASSWORD=<password> ; # # where you replace <host>, <user>, <password> by quoted strings and # <port> by the master's port number (3306 by default). # # Example: # # CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, # MASTER_USER='joe', MASTER_PASSWORD='secret'; # # OR # # 2) Set the variables below. However, in case you choose this method, then # start replication for the first time (even unsuccessfully, for example # if you mistyped the password in master-password and the slave fails to # connect), the slave will create a master.info file, and any later # change in this file to the variables' values below will be ignored and # overridden by the content of the master.info file, unless you shutdown # the slave server, delete master.info and restart the slaver server. # For that reason, you may want to leave the lines below untouched # (commented) and instead use CHANGE MASTER TO (see above) # # required unique id between 2 and 2^32 - 1 # (and different from the master) # defaults to 2 if master-host is set # but will not function as a slave if omitted #server-id = 2 # # The replication master for this slave - required #master-host = <hostname> # # The username the slave will use for authentication when connecting # to the master - required #master-user = <username> # # The password the slave will authenticate with when connecting to # the master - required #master-password = <password> # # The port the master is listening on. # optional - defaults to 3306 #master-port = <port> # # binary logging - not required for slaves, but recommended #log-bin=mysql-bin # Point the following paths to different dedicated disks #tmpdir = "C:/xampp/tmp" #log-update = /path-to-dedicated-directory/hostname # Uncomment the following if you are using BDB tables #bdb_cache_size = 4M #bdb_max_lock = 10000 # Comment the following if you are using InnoDB tables #skip-innodb innodb_data_home_dir="C:/xampp/mysql/data" innodb_data_file_path=ibdata1:10M:autoextend innodb_log_group_home_dir="C:/xampp/mysql/data" #innodb_log_arch_dir = "C:/xampp/mysql/data" ## You can set .._buffer_pool_size up to 50 - 80 % ## of RAM but beware of setting memory usage too high innodb_buffer_pool_size=16M ## Set .._log_file_size to 25 % of buffer pool size innodb_log_file_size=5M innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=1 innodb_lock_wait_timeout=50 ## UTF 8 Settings #init-connect=\'SET NAMES utf8\' #collation_server=utf8_unicode_ci #character_set_server=utf8 #skip-character-set-client-handshake #character_sets-dir="C:/xampp/mysql/share/charsets" sql_mode=NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION log_bin_trust_function_creators=1 character-set-server=utf8mb4 collation-server=utf8mb4_general_ci [mysqldump] max_allowed_packet=16M [mysql] # Remove the next comment character if you are not familiar with SQL #safe-updates [isamchk] key_buffer=20M sort_buffer_size=20M read_buffer=2M write_buffer=2M [myisamchk] key_buffer=20M sort_buffer_size=20M read_buffer=2M write_buffer=2M [mysqlhotcopy]
c. MySQL’s data has been corrupted
If you have had multiple copies of MySQL installed on your device at one point, or had a separate installation of XAMPP, it is possible that the data in your current installation might have been corrupted. In such a scenario, you can try:
- Ensuring that all other installations of MySQL are removed on your computer, then uninstalling and reinstalling XAMPP, or;
- Restoring your existing XAMPP’s MySQL installation with backup data.
If you would like to try option B before reinstalling XAMPP, you can follow the steps below:
- Go to your XAMPP MySQL directory. By default, it is located under Local Disk → XAMPP → MySQL (e.g. if you installed it under the default C-drive, you will find the folder in
C:\xampp\mysql
). Here you will be seeing different folders — the ones that we need to use are thedata
andbackup
folders - Rename the
data
folder todata_old
. - Create a new folder with the name
data
. This is the new folder that MySQL will use to replace the old one. Now, we need to fill this folder with certain files. - Go to the
backup
folder and copy all the files inside it. Paste them into the newdata
folder. - Now, we need to paste databases into our new
data
folder. In order to do so, inside thedata_old
folder, copy themysQL
folder, as well as all the folders under thephpmyadmin
folder. If you have only one folder, it is totally okay, just make sure you paste it. There is NO need to copy theperformance_schema
andphpmyadmin
folders. - Last but not least, we need to copy the
ibdata1
file. Go to yourdata_old
folder, find theibdata1
file, and past it into thedata
folder.
3. Unable to access phpMyAdmin
There can also be cases where you are able to start MySQL on XAMPP, but are unable to access the http://localhost/phpmyadmin
URL. This can be caused by a multitude of reasons, and we explore this in a separate article:
4. Conclusion
As with the other articles on the blog, we’d love if you leave a comment below, especially if you:
- Find any errors in this article.
- Find a problem causing this issue that is not described in this article.
We will periodically upload this article with new solutions and issues that we find, and we will credit you if you share your issues and / or solutions! Your comments will add to the information that is already here, and help other future readers!
Article continues after the advertisement:
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?
This question is related to
mysql
windows
apache
installation
xampp
The answer is
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.
I had an issue with this because I had accidentally installed XAMPP to c:\windows\program 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.
After Stop xampp, go to configure and change the port 3306 to 3308 of mysql and save. Now start the sql……Enjoy
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:
- Open run (Win + r) and type ‘regedit’. This is where you edit your registry.
- Navigate to: HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > MySql
- Click on mySql and notice the ImagePath variable. Right click ‘ImagePath’ and click modify.
- 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
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 ………
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.
- In the cmd type:
services.msc
Find MySql and change properties to the disabled. - 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.
Had this problem today, on a Windows 10 machine. Opened C:\xampp\data\mysql_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:
- Open
C:\xampp\mysql\bin\my.ini
and add the following line towards the end of[mysqld]
section (above the line containing## UTF 8 Settings
):
innodb_flush_method=normal
- Restart MySQL service. Should run just fine.
Only for windows
I have fixed the mysql startup issue by following below steps
Steps:
-
Open CMD and copy paste the command
netstat -ano | findstr 3306
If you get any result for command then the Port 3306 is active -
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
- For CMD-> search for cmd from start menu
- For Powershell-> search for powershell from start menu
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:\xampp\mysql\share\errmsg.sys'
I moved my xampp folder to the root of the drive and it started working.
Hope it helps
If you have other testing applications like SQL web batch etc, uninstall them because they are running in port 3306.
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, but I’ve manually change the directories inside my.ini
(base dir
, data dir
, …). After that mysql started successfully.
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.
Everytime my MySQL starts, it will stop, then I noticed that some files are getting generated in C:\xampp\mysql\data. 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.
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
In Windows, you should go: Start > Run > services.msc > Apache 2.4 > Properties > Start Mode > Automatic > Apply > Start > OK > [Same as MySQL]
Questions with mysql tag:
• Implement specialization in ER diagram
• How to post query parameters with Axios?
• PHP with MySQL 8.0+ error: The server requested authentication method unknown to the client
• Loading class `com.mysql.jdbc.Driver’. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver’
• phpMyAdmin — Error > Incorrect format parameter?
• Authentication plugin ‘caching_sha2_password’ is not supported
• How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue
• Connection Java-MySql : Public Key Retrieval is not allowed
• How to grant all privileges to root user in MySQL 8.0
• MySQL 8.0 — Client does not support authentication protocol requested by server; consider upgrading MySQL client
• php mysqli_connect: authentication method unknown to the client [caching_sha2_password]
• phpMyAdmin on MySQL 8.0
• Authentication plugin ‘caching_sha2_password’ cannot be loaded
• Error loading MySQLdb Module ‘Did you install mysqlclient or MySQL-python?’
• select rows in sql with latest date for each ID repeated multiple times
• How to find MySQL process list and to kill those processes?
• Access denied; you need (at least one of) the SUPER privilege(s) for this operation
• Import data.sql MySQL Docker Container
• PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers
• Hibernate Error executing DDL via JDBC Statement
• Your password does not satisfy the current policy requirements
• MySql ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)
• Laravel: PDOException: could not find driver
• Default password of mysql in ubuntu server 16.04
• #1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’
• Job for mysqld.service failed See «systemctl status mysqld.service»
• Laravel Migration Error: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
• mysqld_safe Directory ‘/var/run/mysqld’ for UNIX socket file don’t exists
• SELECT list is not in GROUP BY clause and contains nonaggregated column …. incompatible with sql_mode=only_full_group_by
• MySQL Error: : ‘Access denied for user ‘root’@’localhost’
• Unable to start the mysql server in ubuntu
• How to turn on/off MySQL strict mode in localhost (xampp)?
• How to store Emoji Character in MySQL Database
• ERROR 1698 (28000): Access denied for user ‘root’@’localhost’
• What is the meaning of <> in mysql query?
• The Response content must be a string or object implementing __toString(), «boolean» given after move to psql
• Xampp-mysql — «Table doesn’t exist in engine» #1932
• #1055 — Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this is incompatible with sql_mode=only_full_group_by
• MySQL fails on: mysql «ERROR 1524 (HY000): Plugin ‘auth_socket’ is not loaded»
• How to insert TIMESTAMP into my MySQL table?
• How to create a foreign key in phpmyadmin
• JPA Hibernate Persistence exception [PersistenceUnit: default] Unable to build Hibernate SessionFactory
• PHP: Inserting Values from the Form into MySQL
• #1292 — Incorrect date value: ‘0000-00-00’
• WooCommerce: Finding the products in database
• ERROR 1067 (42000): Invalid default value for ‘created_at’
• SQLSTATE[HY000] [1698] Access denied for user ‘root’@’localhost’
• SQL query to check if a name begins and ends with a vowel
• MySQL: When is Flush Privileges in MySQL really needed?
• Error in MySQL when setting default value for DATE or DATETIME
Questions with windows tag:
• «Permission Denied» trying to run Python on Windows 10
• A fatal error occurred while creating a TLS client credential. The internal error state is 10013
• How to install OpenJDK 11 on Windows?
• I can’t install pyaudio on Windows? How to solve «error: Microsoft Visual C++ 14.0 is required.»?
• git clone: Authentication failed for <URL>
• How to avoid the «Windows Defender SmartScreen prevented an unrecognized app from starting warning»
• XCOPY: Overwrite all without prompt in BATCH
• Laravel 5 show ErrorException file_put_contents failed to open stream: No such file or directory
• how to open Jupyter notebook in chrome on windows
• Tensorflow import error: No module named ‘tensorflow’
• git clone error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
• bash: npm: command not found?
• Anaconda Installed but Cannot Launch Navigator
• AttributeError: module ‘cv2.cv2’ has no attribute ‘createLBPHFaceRecognizer’
• How to install pandas from pip on windows cmd?
• ‘ls’ in CMD on Windows is not recognized
• Copy Files from Windows to the Ubuntu Subsystem
• Tensorflow r1.0 : could not a find a version that satisfies the requirement tensorflow
• Kill tomcat service running on any port, Windows
• python pip on Windows — command ‘cl.exe’ failed
• How to install pip3 on Windows?
• Mount current directory as a volume in Docker on Windows 10
• Specifying Font and Size in HTML table
• Why Local Users and Groups is missing in Computer Management on Windows 10 Home?
• Command to run a .bat file
• How do I force Robocopy to overwrite files?
• Windows- Pyinstaller Error «failed to execute script » When App Clicked
• How to completely uninstall Android Studio from windows(v10)?
• Docker for Windows error: «Hardware assisted virtualization and data execution protection must be enabled in the BIOS»
• How do I kill the process currently using a port on localhost in Windows?
• Error : getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
• How to add a custom CA Root certificate to the CA Store used by pip in Windows?
• How to reset the use/password of jenkins on windows?
• npm ERR! Error: EPERM: operation not permitted, rename
• CMD (command prompt) can’t go to the desktop
• Xampp-mysql — «Table doesn’t exist in engine» #1932
• Change drive in git bash for windows
• «OverflowError: Python int too large to convert to C long» on windows but not mac
• Visual studio code terminal, how to run a command with administrator rights?
• ImportError: cannot import name NUMPY_MKL
• Pip — Fatal error in launcher: Unable to create process using ‘»‘
• Installing tensorflow with anaconda in windows
• Where does Anaconda Python install on Windows?
• PermissionError: [Errno 13] Permission denied
• How to restart a windows service using Task Scheduler
• How to install xgboost in Anaconda Python (Windows platform)?
• NPM stuck giving the same error EISDIR: Illegal operation on a directory, read at error (native)
• Can’t access 127.0.0.1
• anaconda — path environment variable in windows
• Global npm install location on windows?
Questions with apache tag:
• Enable PHP Apache2
• Switch php versions on commandline ubuntu 16.04
• Laravel: PDOException: could not find driver
• How to deploy a React App on Apache web server
• Apache POI error loading XSSFWorkbook class
• How to enable directory listing in apache web server
• Job for httpd.service failed because the control process exited with error code. See «systemctl status httpd.service» and «journalctl -xe» for details
• How to enable php7 module in apache?
• java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
• The program can’t start because api-ms-win-crt-runtime-l1-1-0.dll is missing while starting Apache server on my computer
• WAMP won’t turn green. And the VCRUNTIME140.dll error
• MySQL error — #1932 — Table ‘phpmyadmin.pma user config’ doesn’t exist in engine
• SSL error SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
• resource error in android studio after update: No Resource Found
• XAMPP keeps showing Dashboard/Welcome Page instead of the Configuration Page
• Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04
• installing apache: no VCRUNTIME140.dll
• Could not load the Tomcat server configuration
• How to add Apache HTTP API (legacy) as compile-time dependency to build.grade for Android M?
• Apache Server (xampp) doesn’t run on Windows 10 (Port 80)
• How to set up file permissions for Laravel?
• Chrome net::ERR_INCOMPLETE_CHUNKED_ENCODING error
• How to allow Cross domain request in apache2
• Getting Error:JRE_HOME variable is not defined correctly when trying to run startup.bat of Apache-Tomcat
• Netbeans 8.0.2 The module has not been deployed
• Only variable references should be returned by reference — Codeigniter
• laravel the requested url was not found on this server
• httpd-xampp.conf: How to allow access to an external IP besides localhost?
• WebSockets and Apache proxy : how to configure mod_proxy_wstunnel?
• How to force reloading php.ini file?
• XAMPP: Couldn’t start Apache (Windows 10)
• how to create virtual host on XAMPP
• phpmyadmin «Not Found» after install on Apache, Ubuntu
• XAMPP installation on Win 8.1 with UAC Warning
• Httpd returning 503 Service Unavailable with mod_proxy for Tomcat 8
• how to configure apache server to talk to HTTPS backend server?
• How to fix PHP Warning: PHP Startup: Unable to load dynamic library ‘ext\\php_curl.dll’?
• error running apache after xampp install
• How to enable local network users to access my WAMP sites?
• Apache Proxy: No protocol handler was valid
• OSError — Errno 13 Permission denied
• Project Links do not work on Wamp Server
• WAMP Cannot access on local network 403 Forbidden
• Apache 2.4 — Request exceeded the limit of 10 internal redirects due to probable configuration error
• How to enable CORS in apache tomcat
• Apache won’t start in wamp
• Execute PHP script in cron job
• «End of script output before headers» error in Apache
• Starting of Tomcat failed from Netbeans
• Tomcat in Intellij Idea Community Edition
Questions with installation tag:
• You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user)
• Conda version pip install -r requirements.txt —target ./lib
• How to avoid the «Windows Defender SmartScreen prevented an unrecognized app from starting warning»
• PackagesNotFoundError: The following packages are not available from current channels:
• Tensorflow import error: No module named ‘tensorflow’
• Downgrade npm to an older version
• Create Setup/MSI installer in Visual Studio 2017
• how to install tensorflow on anaconda python 3.6
• Application Installation Failed in Android Studio
• How to install pip for Python 3.6 on Ubuntu 16.10?
• Tensorflow r1.0 : could not a find a version that satisfies the requirement tensorflow
• ImportError: No module named tensorflow
• Unable to set default python version to python3 in ubuntu
• gradlew command not found?
• Installing TensorFlow on Windows (Python 3.6.x)
• How to install Visual C++ Build tools?
• How to install JQ on Mac by command-line?
• Session ‘app’: Error Installing APK
• How to Install gcc 5.3 with yum on CentOS 7.2?
• How to install Python packages from the tar.gz file without using pip install
• «pip install unroll»: «python setup.py egg_info» failed with error code 1
• «RuntimeError: Make sure the Graphviz executables are on your system’s path» after installing Graphviz 2.38
• Can’t run Curl command inside my Docker Container
• How to install Android SDK on Ubuntu?
• How to install older version of node.js on Windows?
• Tensorflow installation error: not a supported wheel on this platform
• pip installation /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory
• pip install failing with: OSError: [Errno 13] Permission denied on directory
• gcloud command not found — while installing Google Cloud SDK
• How to install VS2015 Community Edition offline
• How can I find the product GUID of an installed MSI setup?
• How to generate .env file for laravel?
• Maven Installation OSX Error Unsupported major.minor version 51.0
• E: Unable to locate package mongodb-org
• Visual Studio 2015 installer hangs during install?
• Wheel file installation
• «installation of package ‘FILE_PATH’ had non-zero exit status» in R
• sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
• Installing Python library from WHL file
• Installing Node.js (and npm) on Windows 10
• Error:Unable to locate adb within SDK in Android Studio
• Python3: ImportError: No module named ‘_ctypes’ when using Value from module multiprocessing
• Install IPA with iTunes 12
• Error in installation a R package
• How should I deal with «package ‘xxx’ is not available (for R version x.y.z)» warning?
• Pip Install not installing into correct directory?
• Cannot install Aptana Studio 3.6 on Windows
• ADB Install Fails With INSTALL_FAILED_TEST_ONLY
• Batch script to install MSI
• Node.js/Windows error: ENOENT, stat ‘C:\Users\RT\AppData\Roaming\npm’
Questions with xampp tag:
• Xampp localhost/dashboard
• phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user ‘pma’@’localhost’ (using password: NO)
• Is there way to use two PHP versions in XAMPP?
• Where to find htdocs in XAMPP Mac
• phpMyAdmin access denied for user ‘root’@’localhost’ (using password: NO)
• How to downgrade php from 7.1.1 to 5.6 in xampp 7.1.1?
• How to turn on/off MySQL strict mode in localhost (xampp)?
• mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it
• How to install mcrypt extension in xampp
• Fatal error: Uncaught Error: Call to undefined function mysql_connect()
• how can I enable PHP Extension intl?
• MySQL error — #1932 — Table ‘phpmyadmin.pma user config’ doesn’t exist in engine
• XAMPP keeps showing Dashboard/Welcome Page instead of the Configuration Page
• How to setup FTP on xampp
• Laravel 5 error SQLSTATE[HY000] [1045] Access denied for user ‘homestead’@’localhost’ (using password: YES)
• XAMPP — Apache could not start — Attempting to start Apache service
• PHP — SSL certificate error: unable to get local issuer certificate
• httpd-xampp.conf: How to allow access to an external IP besides localhost?
• XAMPP: Couldn’t start Apache (Windows 10)
• how to create virtual host on XAMPP
• How to work on UAC when installing XAMPP
• XAMPP installation on Win 8.1 with UAC Warning
• How to downgrade php from 5.5 to 5.3
• error running apache after xampp install
• XAMPP Port 80 in use by «Unable to open process» with PID 4
• PHP: maximum execution time when importing .SQL data file
• XAMPP MySQL password setting (Can not enter in PHPMYADMIN)
• XAMPP Start automatically on Windows 7 startup
• PhpMyAdmin not working on localhost
• Xampp MySQL not starting — «Attempting to start MySQL service…»
• MySQL Database won’t start in XAMPP Manager-osx
• How to stop VMware port error of 443 on XAMPP Control Panel v3.2.1
• New xampp security concept: Access Forbidden Error 403 — Windows 7 — phpMyAdmin
• How to start Apache and MySQL automatically when Windows 8 comes up
• XAMPP — Port 80 in use by «Unable to open process» with PID 4! 12
• XAMPP Object not found error
• how to configuring a xampp web server for different root directory
• XAMPP, Apache — Error: Apache shutdown unexpectedly
• xampp MySQL does not start
• XAMPP — MySQL shutdown unexpectedly
• Apache is not running from XAMPP Control Panel ( Error: Apache shutdown unexpectedly. This may be due to a blocked port)
• Port 443 in use by «Unable to open process» with PID 4
• How do I use MySQL through XAMPP?
• Xampp Access Forbidden php
• Localhost : 404 not found
• how to get login option for phpmyadmin in xampp
• Apache shutdown unexpectedly
• How to Set user name and Password of phpmyadmin
• How do I test a website using XAMPP?
• How to get back Lost phpMyAdmin Password, XAMPP
Sometimes MySQL may fail to start in XAMPP, which can be a frustrating experience for users. If you are facing this issue, don’t worry, as there are several steps you can take to fix MySQL not starting in XAMPP on Windows. xampp MySQL not starting windows 11/10; In this tutorial, you will learn how to fix MySQL not starting xampp control panel in windows 11/10.
When you start mysql in xampp you will see some errors. Which is visible in the image given below. But your mysql server will not start in xampp windows.So it means that your mysql server has become corrupt. and it needs to be repaired.
This has happened to us on some commits with Windows XAMPP, which appears to be caused by stopping the MySQL server in the control panel.
This was our error log when we tried to start the MySQL server:
3:43:26 PM [mysql] Attempting to start MySQL app... 3:43:26 PM [mysql] Status change detected: running 3:43:28 PM [mysql] Status change detected: stopped 3:43:28 PM [mysql] Error: MySQL shutdown unexpectedly. 3:43:28 PM [mysql] This may be due to a blocked port, missing dependencies, 3:43:28 PM [mysql] improper privileges, a crash, or a shutdown by another method. 3:43:28 PM [mysql] Press the Logs button to view error logs and check 3:43:28 PM [mysql] the Windows Event Viewer for more clues 3:43:28 PM [mysql] If you need more help, copy and post this 3:43:28 PM [mysql] entire log window on the forums
Follow the below given easy steps to fix/resolve MySQL server not starting in XAMPP windows. And your Mysql server will start in the xampp windows:
- Step 1 – Visit Xampp/mysql Directory
- Step 2 – Make Backup Directory
- Step 3 – Copy MySQL Directory Data
- Step 4 – Paste MySQL Data in Directory
- Step 5 – Copy
ibdata1
Directory Data - Step 6 – Restart MySQL Server In Xampp
Step 1 – Visit Xampp/mysql Directory
Navigate to your XAMPP MySQL directory (C:\xampp\mysql
).
Step 2 – Make Backup Directory
Make a new folder called FIX_BACKUP
.
Step 3 – Copy MySQL Directory Data
Copy C:\xampp\mysql\backup
and C:\xampp\mysql\data
into C:\xampp\mysql\FIX_BACKUP
.
Step 4 – Paste MySQL Data in Directory
Paste the contents of C:\xampp\mysql\backup
into C:\xampp\mysql\data
overwriting all the files.
Step 5 – Copy ibdata1
Directory Data
Finally copy the ibdata1
file from C:\xampp\mysql\FIX_BACKUP\data
into C:\xampp\mysql\data
overwriting the file.
Step 6 – Restart MySQL Server In Xampp
Now restart MySQL server in xampp. So, Your MySQL server should now start in the XAMPP control panel.
If the above steps do not resolve the issue, it may be necessary to reinstall XAMPP. This will ensure that all components are installed correctly and that there are no missing or corrupt files. Follow these steps to reinstall XAMPP:
- Uninstall XAMPP from your system.
- Download the latest version of XAMPP from the official website.
- Install XAMPP on your system, making sure to select all the required components.
- Start XAMPP and check if MySQL is running.
Conclusion
MySQL not starting in XAMPP can be a frustrating problem, but fortunately, it can be fixed by following the steps above. By checking the XAMPP control panel, looking for conflicting ports, checking the MySQL error log, and reinstalling XAMPP, you can get MySQL up and running in XAMPP in no time.