Yosemite MAMP regret - mysql

I made a really big mistake.
So I'm running OS X Yosemite latest with MAMP.
I accidentally deleted the mysql.pid file in MAMP/tmp/mysql/ by mistake because I read in another article that it would fix it. Turns out it didn't.
However I did fix another issue regarding the Apache Server which was adding a "_" on a certain file. So my Apache server has the green light.
But MYSQLServer just won't turn on the green light. Before deleting that file, it was turning on. Ugh.
So I thought maybe I uninstall MAMP by deleting the MAMP folder and putting it into trash and deleting it forever. Oops.
Now when I reinstalled MAMP, it actually remembered my old MAMP that I "thought" I "deleted" and uninstalled.
So now I get a message that says:
Apache couldn't be started because port 8888 is in use by some other software
So I'm really screwed and not sure what to do after. Really sorry with this.
Thanks for the help.

Using Activity Monitor search for: MySqld and Httpd and end the process for them. I had one Mysqld and loads of Httpd. After this restart Mamp and fingers crossed you'll get both green lights..

Go to your MAMP directory. Go to Library/bin there is a file called envvars change the name to _envvars.

I upgraded MAMP from version 1.9.6 to 3.0.7.2 (on OS X Yosemite) and got the same error:
Apache couldn't be started because port 8888 is in use by some other software.
I tried:
deleting MAMP and reinstalling
stopping any httpd and mysqld processes then restarting MAMP
changing the port
...and a few other things suggested in Stack Overflow answers with no success.
In the end I fixed the issue by deleting MAMP, restarting my machine and then installing MAMP again.

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

MAMP 4.1.0 on Win 10 not starting MySQL

I've installed MAMP 4.1.0 on Win 10 Home on my HP laptop (AMD Ryzen 5 processor / 8G Ram / 1TB HDD) and am having issues keeping MySQL (V.5.7.24) running. It defaults to ports 80 for Apache and 3306 for MySQL. Apache starts and runs fine. MySQL only starts upon first initial installation and it works perfectly at that point. I can access via phpMyAdmin with no problems. But if I shut the servers down and attempt to restart, only Apache starts, MySQL does not. I've tried rebooting, but MySQL will NOT restart. I've checked the MySQL error log, but nothing appears to show anything associated with the problem. If I try to use phpMyAdmin while MySQL is shown as not up in MAMP I get the error messages shown in the attached file phpMyAdmin Errors. If anyone has any ideas on what the problem might be and what I can do to resolve this, please respond. I appreciate any help.
I had the same problem. Contacted mamp support. Their answer was the following. It worked for me. Hope this helps you too.
Stop all servers in MAMP.
For MAMP:
With Windows Explorer go to folder C:\MAMP\db\mysql\ (if C:\MAMP\ is your installation directory).
First backup all files that begin with mysql-bin.*
Then delete all files that begin with mysql-bin.* (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)
For MAMP:
Open up MySQL configuration file in text editor of your choice:
C:\MAMP\conf\mysql\my.ini
This example assumes C:\MAMP\ is your installation directory.
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.
Try the following. It fixed my issue.
Stop your MAMP Server.
Find the db folder for mysql. In my case: C:\MAMP\db\mysql
Rename the mysql-bin.index file to mysql-bin_old.index
Start your MAMP Server

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

homebrew: MySQL not starting, Can't update PID file

I am a new Mac user and trying to set up the development environment with Apache, PHP and MySQL. Initially, after a lot of installs and reinstalls i succeeded in installing MySQL (Apache and PHP came bundled with Mac) but now again mysql refuses to start up and gives the error, The server quit without updating PID file (/usr/local/var/mysql/Nikhils-MacBook-Pro.local.pid).
I have literally gone through entire SO questions regarding this problem but have not found a way to fix this and i mean i have done everything to start this but in vain. I have created the PID file too but it disappears in moments, i did a cleanup and reinstall using this SO Question but it has failed YET again. Please, i need to get my server started, i am really losing on to serious work and time.
Is there any other miraculous way to fix this unattainable feat? Also, if anyone asks what is the error in the log files, please don't as there is no log being registered as the server hasn't started yet.
I’ve got a similar problem with MySQL on a Mac (Mac Os X Could not startup MySQL Server. Reason: 255 and “ERROR! The server quit without updating PID file”) and after a long trial and error process, finally in order to restore the file permissions, I’ve just do that:
launch the Disk Utilities.app
choose my drive on the left panel
click on the “Repair disk permissions” button
This did the trick for me. Hoping this can help someone else.
brew install mysql on mac os
These instructions helped me. There was a my.cnf in /usr/local/opt/mysql/ which seems to have been the problem for me. YMMV.

MAMP Pro Error: The MySQL configuration file my.cnf couldn't be written

I tried to use MAMP Pro to replace previous XAMPP on my Mac due to its easy Virtual Hosts management. However after I installed it. The MAMP, basic version works, but the Pro version keeps given me this error message:
The MySQL configuration file my.cnf couldn't be written.
I googled for a while and there are some different solutions, like create my.cnf on /etc/, but none of these works. Also the error log is empty.
Has someone encountered this before? Or does anyone have a clue how could I solve this problem? Thank you!
I just purchased MAMP PRO and I'm having this error as well. Here's what "fixed" it:
Open Terminal and type in sudo killall -9 mysqld. You might see "No matching processes belonging to you were found," which is fine, it means that MySQL was not running.
Now, in Applications, look for the regular MAMP folder. Open MAMP here and click Start Servers
Now open MAMP PRO and the servers should be started
This is just a work-around, it definitely should not require these. At the very least, this should get you up and running.
Contacting support!
File -> Reset to Factory Settings
Possibly a permissions issue, but I wasn't able to resolve it. The above fixed it for me.
uninstall mamp.
remove all files about mamp.
reinstall mamp.
I removed 'my.cnf' from '/etc' directory. Restarted MAMP pro. Started server successfully.....
Your configuration may be wrong.
exp.
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION # success
or
sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' # error