XAMPP MySQL port 3306 keeps reseting itself - mysql

I am attempting to setup XAMPP on my PC, but I keep getting the famous:
17:07:22 [mysql] Problem detected!
17:07:22 [mysql] Port 3306 in use by "D:\mysql\bin\mysqld MySQL"!
17:07:22 [mysql] MySQL WILL NOT start without the configured ports free!
17:07:22 [mysql] You need to uninstall/disable/reconfigure the blocking application
17:07:22 [mysql] or reconfigure MySQL and the Control Panel to listen on a different port
17:07:22 [mysql] Attempting to start MySQL service...
I have had mysql already installed on PC for educational purposes, and not it seems to create this problem.
I have tried:
Renaming the ports in my.ini
Checking the netstat, finding the PID and disabling it in the task manager
Disabling the mySql in services
Ending its process in the task manager
In the last three options, mysql would always turn itself back on whenever I tried to start it. I mean it's logical, but every time with that damn error.
So, does anybody know a way to fix this error?
And if not, anybody know a different soft to get me a localhost without many problems?

Try the running the installator again.
When using WAMP, whenever some weird/random configuration failed, usually running the installer with administrative rights fixed the issue.
However, on XAMP, some details may differ.
Check for the following service: xampmysqld64 kill that service. then restart your WAMP

There is a very good tutorial by Rachel Andrew who recommends installing PuPHPet, VirtualBox and Vagrant to solve your development environment woes:
https://rachelandrew.co.uk/presentations/deploy/puphpet

Related

MySQL Server on MAMP-Windows Will Not Start

I am using MAMP 4.1 on Windows 10 and cannot get MySQL server to start. When I uninstalled MAMP and re-installed it MySQL server starts up, but when I stop it, it will not start back up. I also went into the \mamp\db\mysql\ and deleted the four log files hilited below. Then I turned the server off, then back on, but only Apache starts up, not MySQL.
There is also a process running in services called MySQL80. When I try to start it I get the error message shown. I have tried many ways to delete it, including going to the command prompt and using "sc mysql80" and going to 'regedit'. MySQL80 does not show up anywhere so that I can delete it.
Also, the Resource Monitor below shows that Apache is running on port 80, but nothing on port 3306. And yes, my MAMP Preferences are set to port 3306 for MySQL.
When MySQL was running, I had 2 processes of 'mysqld' listening: one session on IPv6 Port 3306, and the other session on IPv4 Port 3306?
What's wrong and how do I fix it?
And, is there suppose to be (2) sessions of 'mysqld' both listening on port 3306 where one is on IPv6 and the other is on IPv4?
Thanks Community.
MAMP Control Panel
mysql80 Service
Resource Window with Ports Listed
MAMP Log Files
I had the same problem. I contacted mamp support, and their answer was the following; it worked for me. Hope this helps you too. Stop all servers in MAMP.
The below assumes your MAMP installation directory is C:\MAMP\.
For MAMP:
With Windows Explorer go to folder C:\MAMP\db\mysql\
First backup all files that begin with mysql-bin.*, then delete them (including mysql-bin.index file.)
Then try starting all MAMP servers again (wait for MySQL to turn light on).
After that stop all MAMP servers again.
You'll now try to disable binary log-bin in MAMP (or MAMP PRO)
Open up MySQL configuration file in text editor of your choice: C:\MAMP\conf\mysql\my.ini
Find following text: log-bin
Comment this line by adding # character at start of line.
#log-bin=mysql-bin
Save and restart servers
After that put the mysql-bin.* files back in their place.
Turn off your MAMP Server.
Locate your db folder for mysql. Example: C:\MAMP\db\mysql
Rename the mysql-bin.index file to mysql-bin_old.index (or anything really)
Turn on your MAMP Server
This is a very common issue with MAMP. If this happened to you out of the blue, this is probably the fix.
This is what I did to solve this issue:
Quit MAMP if open
Navigate to /MAMP/tmp/mysql
Rename mysql.sock.lock
Restart MAMP
my issue was Avast Antivirus blocking MAMP, disabled for 10 minutes and Apache started
I had the same problem today.
I did try removing everything from C:\MAMP\db\mysql\ and tried to restart MAMP & servers. But it failed.
Then I noticed the following error in the mysql log file /MAMP/logs/mysql_error_log.err
[error] Cannot open windows event_log ; check privileges
This basically means that you don't have sufficient access.
So
I replaced all the files that I originally deleted
shutdown the server & MAMP.
Now right click on the MAMP icon & choose run as administrator
Now it starts up normally
Uninstall entire MAMP and also any other xamap and wamp if you install previously.
Check the drive C. No any other folder or file related to this present there.
then reinstall MAMP again. All the problems are solve your apache and mysql both start.
please vote me.
This is what worked for me :
Click on Start Servers in MAMP
Manually click on mysql.exe in
MAMP installation folder (C:\MAMP\bin\mysql\bin\mysql.exe)
Tip : You can pin mysql.exe to Start Menu so you don't always have to search for this folder

How to upgrade MariaDB within Xampp

I want to upgrade to MariaDB 10.2 and I'm using xampp ( I like that mysqld.exe runs in the background and easy On/Off with a single click ). What happens is that the latest version as of now is 3.2.2 and it has MariaDB 10.1.29 comes with it.
I'm looking for a general healthy way to do it.
I've tried those steps that pretty much look good :
Unzipping/installing the new MariaDB then copying the data directory and the config|bat files + phpMyAdmin from the old to the new installation.
After starting for an instant, it shuts down complaining :
13:44:33 [main] Control Panel Ready
13:52:46 [mysql] Attempting to start MySQL app...
13:52:46 [mysql] Status change detected: running
13:52:49 [mysql] Status change detected: stopped
13:52:49 [mysql] Error: MySQL shutdown unexpectedly.
13:52:49 [mysql] This may be due to a blocked port, missing dependencies,
13:52:49 [mysql] improper privileges, a crash, or a shutdown by another method.
13:52:49 [mysql] Press the Logs button to view error logs and check
13:52:49 [mysql] the Windows Event Viewer for more clues
13:52:49 [mysql] If you need more help, copy and post this
13:52:49 [mysql] entire log window on the forums
Notes:
I'm not gonna try some random deletes that are very likely to
make my db tables corrupt (even though I did before and it didn't
work)
Please take notice that if I run the server itself using an unprivileged user
(not administrator) on the command line, it runs as expected.
Furthermore, the status in the Xampp control panel would change to green :
14:00:35 [mysql] Status change detected: running
And I could even shut down the MySQL server from it, by clicking on stop.
If I run Xampp as administrator (which could be a bad idea), I get the same error message above.
Please note also that running MySQL server as an administrator involves security risks.
I know I can run it as a service, but I'd rather like to have instant control over when to turn it On/Off.
The purpose :
Looking for a clean way to upgrade MariaDB within xampp, on windows (Windows7)
I had the exact same issue, how I resolved it was:
Re-installed MariaDB to the x32 version because I installed the x64 first
Copied "my-huge.ini" from "C:\xampp\mysql" to "C:\xampp\mysql\bin\my.ini"
Now everything works as expected, start/stop everything is smooth. I guess there is some specific setting that is not quite correct on the old "my.ini" from XAMMP.
Of course, all this was done after I did these steps:
Be sure all modules are stopped from the XAMPP Control Panel
Downloaded an installer of the latest stable version of MariaDB
Renamed "C:\xampp\mysql" to "C:\xampp\mysql_old"
Installed the downloaded MariaDB to "C:\xampp\mysql"
Copied the following directories to maintain my databases:
C:\xampp\mysql\data
C:\xampp\mysql\scripts
C:\xampp\mysql\share
Run Apache and MySQL module from the XAMPP Control Panel, and done.
For me, I would create dumps of existing databases and uninstall current xampp installation then download newest version of xampp which will of course contain a newer version of mariadb

XAMPP Mysql won't start

I've been using XAMPP for a couple of months and suddenly I'm getting an error in XAMPP that I haven't been able to find a solution.
12:07:28 [mysql] Problem detected: MySQL Not Found!
12:07:28 [mysql] Disabling MySQL buttons
12:07:28 [mysql] Run this program from your XAMPP root directory!
This is the error I'm getting from the XAMPP control panel.
When I go to the XAMPP root directory and try to run the mysql_start.bat file it says
mysql\bin\mysqld is not recognized as an internal or external command operable program or batch file
I'm not sure what to do from here to get everything working again.
You have not specified the OS in which you are working. Most possible solution is to install the xampp application as admin and disable anti virus during the installation process. Also disable UAC if in windows. Run the application as administrator. This post is taken from a previously asked question on the same topic. You can find it here
apache and mysql start button are disabled in xampp control panel

Change Ports in MAMP and Apache won't start (Mac)

I am using MAMP 3.2.1 on Mac OS X 10.9.5 and trying to change my Ports so I can go to localhost/... instead of localhost:8888/... in my browser.
When I go to change the ports in Preferences the option I have is "Set Web & MySQL ports to 80 & 3306", however when I do this, the Apache server does not restart.
I have seen other posts that say rename envvars to __envvars but mine is called envvars_ so I'm guessing that's irrelevant.
Any suggestions?
This is rather older post but I faced the same issue today. As it turned out there was already one more Apache running on port 80 and was clashing with the new MAMP port setup. Hopefully this will help you:
Setup ports to 80 (Apache), 81 (nginx) and 3306 (mysql) in your MAMP configuration.
Quit your MAMP
From CLI type sudo apachectl stop
From CLI type ps -A | grep httpd and you shouldn't see any running process (apart from your grep)
Start your MAMP (at this point MAMP should start Apache since 80 port is not in use)
You can follow the instruction bellow, it worked for me.
1.Open Activity Monitor program and select "All Processes"
2.Search for "mysqld" in the search area. You might see an example of mysql running
3.hit quit process.
4.Restart MAMP and it will fix all.
When you have installed MAMP, before starting it, change the port to 80 & 3306, then it will work properly. Once you start it with default port and then stopping it and changing port raises this issue.

Xampp Mysql wont start

I have read all the posts about this none fix it? please help ive even tryed re-installing my computer and reinstalling xampp
Errors:
00:33:43 [mysql] Problem detected!
00:33:43 [mysql] Port 3306 in use by ""C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin\mysqld" --defaults-file="C:\Program Files (x86)\MySQL\MySQL Server 5.1\my.ini" MySQL"!
00:33:43 [mysql] MySQL WILL NOT start without the configured ports free!
00:33:43 [mysql] You need to uninstall/disable/reconfigure the blocking application
00:33:43 [mysql] or reconfigure MySQL and the Control Panel to listen on a different port
00:33:43 [mysql] Attempting to start MySQL service...
Then i get a user account control to allow changes when i try to start mysql? something to do with net.exe? in C:\Windows, im not sure of the rest of the directory
If i say no to the user account cocntrol then it says this
00:33:49 [mysql] There may be an error, return code: 1223 - The operation was cancelled by the user.
If i say yes nothing happens? Apparently its windows 5.1 erroring? but the directory doesnt even exist? i deleted it all from Program Files and Program Files (x86), Also uninstalled all mysql components? Any thoughts
I had the same problem. I was using standalone MySQl for Java, and then I install XAMPP even after uninstalling stand-alone MySQL, XAMPP MySQL wouldn't start.
The problem is even after uninstalling MySQL MySQL service is normally still in the registry. The solution is to remove MySQL service from registry. The easiest way to do this, run XAMP-control in Administrator mode, and remove MySQL from service list and start MySQL again. That's it
Here is the way to know the program, use netstat -ao
You have the port and the associated pid.
Get the pid for 3306.
Then launch taskmgr
Show column pid (Menu > Select > Column selection > check PID)
You know the program which uses this 3306 port.
Kill it
Restart your XAMP
Then for not starting this "3306 port" program, launch services.msc.
It is certainly a MySQL, search for it and desactivate it at startup.
close Xampp server
go to C:\xampp\mysql\data
delete the ibdata1 file
restart xampp server
yes i already get this, the problem is that you already install MySQL as standalone version OR with VM i guess , and then you install xampp, the solution for that, is open process monitor, and close MySQL, MySQL Server 5.1 then you can start xampp and will work fine ^^
I just uninstall the register service using
sc delete MySQL
and restart my xmapp service; then it works OK.