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

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.

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

MySql is not connecting on default port. Maybe because I had MAMP

here´s my problem.
I was required to install MySql server as a local process to create a development environment. I use Mac OS X Yosemite. Pretty normal...
But...
After the installation... I noticed that mysqld connects on port 3307 instead of 3306.
I also noticed that I had MAMP previously installed.
So... I removed MAMP (not sure if did it the right way... erased the folder and it´s contents)... Removed MySql (removed all mysql folders on var/local and on /etc)... Removed even Workbench (leap of faith...)
Reinstalled Mysql and........ NOTHING... still connects at 3307..
So I changed my.cnf in /etc... and...... NOTHING again... mysql seems to be ignoring my.cnf...
I´ve searched for all my.cnf files possible... and made sure that the port line is commented on all of then...
Please... I can´t sleep anymore... Help me!!!
I had same problem and i couldn't change mysql ports from configuration files.
SOLUTION :: You should change your launch daemon configurations(or com.oracle.oss.mysql.mysqld.plist) from /Library/LaunchDaemons
MySQL Launch Daemon configuration link

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.

Using XAMPP Install of MySQL with Netbeans 6.8/MySQL Workbench

All,
For all of this I am using Mac OSX Snow Leopard.
I have happily used XAMPP to develop PHP backed sites in the past with no problems(as you'd expect for such a simple to set up package). I am now trying to set up this MySQL install in Netbeans 6.8 (for now just trying to get a sample database backed webapp to run). My issue is that even though MySQL has been started I cannot connect to it at 127.0.0.1 on port 3306 (which it is set up to use).
I have read that the issue is that XAMPP holds MySQl.sock in /Applications/XAMPP/xamppfiles/... whereas MySQL Workbench and Netbeans expects to find it in /tmp/MySQL.sock. Is this correct? I've tried to set up a symbolic link from /tmp to the xmapp directory but this doesn't appear to have changed anything.
Is there anything else I can try/anything that I am missing?
I upgraded from an older version of XAMPP to 1.7.3 and encountered a the same problem, I got MySQL Workbench to connect if I edited the my.ini file and:
changed the socket parameter to:
socket = "TCP/IP"
made mysql bind to an IP address or all IP as in the case below:
enable-named-pipe
bind-address=0.0.0.0
This requires that you disable named-pipe (as shown above)
I could not get this to work. So in case anyone else is reading this and wondering what happened... I installed a non XAMPP instance of the MySQL database and am using that now instead. Less than ideal but it works.

What is the benefit to running MySQL on MAMP on port 3306?

I've had a lot of problems trying to get MySQL installed on my Mac, so I caved and installed MAMP.
MAMP sets its versions of Apache and MySQL to use ports 8888 and 8889. A lot of the MAMP tutorials (such as this one) mention that you should set MAMP's Apache and MySQL ports to their defaults of 80 and 3306, but they don't mention why (besides http://localhost:8888/ becoming http://localhost).
Apache and MySQL seem to start fine using MAMP's defaults, and I am able to get Apache to start under port 80, but MySQL won't start when I try to set it to port 3306. I think this has something to do with a phantom installation of MySQL that I tried to install and scrapped (but I could be wrong).
Do you foresee problems with the fact that I may be running a phantom instance of MySQL, or is this a separate issue? Will it be important to set MySQL to run under 3306, or should I just leave it at 8889 and move on?
You can just leave it on 8889. Important thing is that in your connection string you specify new mysql port, so php will know where it has to connect
Any server application can run on any port.
The caveats are:
Running on a port < 1024 requires that you have root privilege
Client configuration will need updating if the port used is "non-standard". Running on the standard port normally allows the port field to be omitted
SOHO Firewalls may have limits on the number of custom "services" that may be configured, but usually have a decent list of known services