MySQL with MAMP does not work with OSX Yosemite 10.10
Asked Answered
L

15

20

[EDIT] The last version of MAMP with the last version of OSX Yosemite works fine.

I installed the beta of Yosemite two month ago, no problem with MAMP. With the last release of OSX, Apache and MySQL did not work.

I found a solution for Apache by using the default port 80 and renaming the file envvars to _envvars in Applications/MAMP/Library/bin but have not been able to solve the problem with MySQL.

Langrage answered 15/8, 2014 at 19:47 Comment(0)
O
6

Had same issue today (running last version of Yosemite preview), Apache of XAMPP for OSX didn't work / start. Apache's log files contained no errors.

Finally I've solved this issue by removing XAMPP for OSX and installing latest version of AMPPS (http://www.ampps.com/downloads).

I don't know what's the different or what's the initial problem causing this behaviour - but with AMPPS everything just runs fine.

Hopefully this will work also for you.

Omphale answered 15/8, 2014 at 20:1 Comment(2)
Do you have a tip to do not recreate each database ?Langrage
If your initial instance of mysql is still running, connect with terminal client or for examle a tool like Sequel Pro (sequelpro.com) to it and export / dump your databases - so you can import them in your new mysql server.Omphale
T
59

Per the Knowledge Base at MAMP for "Apache will not start - Yosemite Beta":

Rename the file envvars located in /Applications/MAMP/Library/bin into _envvars

Touchwood answered 27/8, 2014 at 23:58 Comment(3)
This worked for my MAMP PRO on Yosemitee. No need to re-install.Titration
OP was mentioning mySQL not apacheUnfair
Worked! This was a life-saver today! Thanks so much :-)Revengeful
K
13

You can also try this workaround posted at http://community.bitnami.com/t/mysqld-doesnt-start-in-mac-os-yosemite/25153

/Applications/XAMPP/xamppfiles/xampp

Look for:

$XAMPP_ROOT/bin/mysql.server start > /dev/null &

And add unset DYLD_LIBRARY_PATH on top of it. It should look like:

unset DYLD_LIBRARY_PATH
$XAMPP_ROOT/bin/mysql.server start > /dev/null &

I hope it helps

Kendra answered 20/8, 2014 at 12:52 Comment(0)
P
10

On MAMP, I was able to get MySQL to work by editing /Applications/MAMP/bin/startMysql.sh and unsetting DYLD_LIBRARY_PATH. So the updated script looks like this:

# /bin/sh
unset DYLD_LIBRARY_PATH
/Applications/MAMP/Library/bin/mysqld_safe... etc.      

It also required killing all MySQL processes previously started by MAMP.

Patrilineal answered 19/10, 2014 at 0:55 Comment(3)
This one is exactly what I need. It works after I restart the Mac.Density
if this isn't working straight away it's probably because mysqld has started "badly". Open Activity Monitor and force quit it. Then try clicking "start servers" in MAMP and it should work after a few seconds. test it at localhost:8888/MAMP (default mamp start page). If MySQL is NOT working it will give you a connection error on that page. If it is working the page will load properly and you will get a MAMP/tmp/mysql/mysql.pid file.Wayzgoose
Nice one Sergey. This fix worked immediately when I clicked "Start Servers" on the MAMP control panel.Bookstack
O
6

Had same issue today (running last version of Yosemite preview), Apache of XAMPP for OSX didn't work / start. Apache's log files contained no errors.

Finally I've solved this issue by removing XAMPP for OSX and installing latest version of AMPPS (http://www.ampps.com/downloads).

I don't know what's the different or what's the initial problem causing this behaviour - but with AMPPS everything just runs fine.

Hopefully this will work also for you.

Omphale answered 15/8, 2014 at 20:1 Comment(2)
Do you have a tip to do not recreate each database ?Langrage
If your initial instance of mysql is still running, connect with terminal client or for examle a tool like Sequel Pro (sequelpro.com) to it and export / dump your databases - so you can import them in your new mysql server.Omphale
B
4

This solved my problem with mysqld and apache on XAMPP:

As you can see, Yosemite DP 5 changes a few things in its library. Probably if you’re running XAMPP server on DP5 it won’t start mysqld (MySQL database daemon).

What you should do?.

STEP 1 . Download Homebrew. Open your terminal and then type: . . . ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

STEP 2: . Download LIBICONV, you have to type the following lines at terminal: . . . brew install libiconv . . . brew link libiconv —force

STEP 3 . Download SQLITE3, you have to type the following lines at terminal: . . . brew install sqlite3 . . . brew link sqlite3 —force

STEP 4 . Go to Applications/XAMPP/xamppfiles/lib and then delete the following files (remember to empty your trash). . . . libsqlite3.dylib (it is an ALIAS) . . . libsqlite3.0.8.6.dylib . . . libiconv.2.dylib . . . libiconv (it is an ALIAS).

STEP 5 .Restart you “manager-osx.app” then try to turn on your mysql database.

Via: http://exequielplaza.com/funstuff/xampp-dp5-yosemite-mysqlfix.html

Bathurst answered 16/8, 2014 at 3:14 Comment(3)
I already seen this solution but I'm using MAMP and not XAMPP.Langrage
Yosemite killed my XAMPP and this fixed it! Just so nobody is confused, the libiconv.dylib, not libiconv.la is the last file to delete.Fowling
I've been wrestling with this issue for a long time. Thank you sir, worked for me!Herbart
U
3

OP question was about MAMP.

I had this issue after installing OSX Yosemite and fixing the envvars to _envvars in the bin/apache2/bin folder.

Then I was getting this socket error. So I checked the error logs for mysql and noticed this:

InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process

gee I love error logs.

I found the process mysqld in Activity Monitor and killed it. Restarted MAMP and bingo! It all seems to hook up now!

Unfair answered 11/11, 2014 at 9:30 Comment(0)
G
1

I have resolved the situation by changing the default Port of Apache 2.4 updated after upgrading to MAC OS Yosemite.

The file is located in: /etc/apache2/httpd.conf

Change Listen 80 to Listen 8080

Restart your MAC, and try to launch again MAMP Services.

Gable answered 18/10, 2014 at 15:4 Comment(1)
Works with XAMPP for me!Sibel
T
0

I fixed this by uninstalling XAMMP and reinstalling. If you go with this approach make sure to back up any content you may have saved in the XAMPP folder.

Testis answered 22/8, 2014 at 20:57 Comment(0)
R
0

I am also running into the same problem with MAMP. Absolutely clueless but with the other responses pointing toward a recent update in OSX I can believe that the problem stems from here. Uninstalled and reinstalled MAMP and MySQL is the only operation able to run...Apache still hangs. Will be downloading AMPPS to see if this corrects things.

Reciprocate answered 23/8, 2014 at 12:13 Comment(1)
Check my answer above Stephen. Nice wedding shot btw!Unfair
D
0

I still needed to use envars so I was able to work around this by removing the following from the file. Found some errors when launching through terminal related to this

if test "x$DYLD_LIBRARY_PATH" != "x" ; then
  DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
else
  DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib"
fi
export DYLD_LIBRARY_PATH
Ducal answered 16/9, 2014 at 20:51 Comment(0)
G
0

Edit the below file, with this command on Terminal.app:

sudo vim /Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh

On line #59, delete this:

/Applications/XAMPP/xamppfiles/xampp startmysql > /dev/null &

and put this

/Applications/XAMPP/xamppfiles/bin/mysql.server start > /dev/null &

(save the file: ESC :wq!)

Restart All Servers on XAMPP.app (manager-osx)

Gear answered 19/10, 2014 at 0:54 Comment(2)
@Lolloz89 Only for OSx Yosemite and XAMPP 1.8.3-5Gear
Worked for me too! Nice easy solution.Leff
U
0

I have had the same issue and none of the above worked.

The Apache server in MAMP wouldn't work on port 80, or 8080 (The default Apache ports). The issue is with Apache being enabled by default in Yosemite.

Either: change the Apache port in MAMP (Not preferable if you want to use the default port), or unload the launch Daemon by typing the following into the terminal:

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

Under answered 28/10, 2014 at 19:0 Comment(2)
It's weird because when I installed AMPPS it works perfectly with the default port without the need to unload apache from Yosemite. I think it's rather a MAMP issue.Langrage
I've never used AMPPS, but could it possibly make use of the pre-installed OS X Apache server? MAMP has it's own copy of Apache which comes into conflict with the pre-installed one. Really, the people at MAMP should make allowances for this. If it's as simple as resetting a few files on installation.Under
B
0

Just to add to this thread, for those running Bitnami MAMP I had the same issue when upgrading to Yosemite (Mampstack-5.4.28-0). I solved it by going to

Applications/Mampstack-(your version)/mysql/scripts/ctl.sh

and adding the following

MYSQL_PIDFILE = ....

unset DYLD_LIBRARY_PATH <==== Add this

MYSQL_START = ....

MYSQL spun like silk. Hope this helps someone with the same problem.

Become answered 19/12, 2014 at 23:59 Comment(0)
S
0

I've found this video. This works for me.

Go to MAMP in Applications

then, bin > apache2 > bin and rename 'envvars' to '_envvars'

https://www.youtube.com/watch?v=brpKAM2WXhk

Schild answered 2/3, 2015 at 19:38 Comment(0)
U
0

Above solutions didn't work for me as I had no conflicting mysqld instances running. After check the mysql error logs in MAMP, it was obvious msqld was having all sorts of issues starting. The main error was:

[ERROR] /Applications/MAMP/Library/bin/mysqld: unknown option '--//skip-networking'

Which pointed me to an option in my.conf file. Somewhere along the line with debugging another issue I had added:

//skip-networking

As an option or I had commented it out. Removing that line allowed mysql in MAMP to start correctly.

Unfair answered 10/8, 2015 at 0:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.