MySQL with MAMP does not work with OSX Yosemite 10

2019-02-02 06:17发布

问题:

[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.

回答1:

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.



回答2:

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



回答3:

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



回答4:

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.



回答5:

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



回答6:

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!



回答7:

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.



回答8:

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.



回答9:

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.



回答10:

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


回答11:

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



回答12:

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)



回答13:

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.



回答14:

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



回答15:

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.



标签: mysql macos mamp