MySQL with MAMP does not work with OSX Yosemite 10.10 - mysql

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

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

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

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.

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.

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

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!

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.

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.

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.

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

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

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)

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.

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

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.

Related

Why when I start phpmyadmim this writting appears?

I start on Xammp Apache and MySQL but when I click on admin instead of opening the phpmyadmin page I see this writing:
Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: mysqli, openssl
What I have to do in order to solve this issue.
p.s. I imagine that I have to install this two files but in which folder I have to put them?
It appears to be a problem with the XAMPP version 8.0.3 and the suggested solution was to reinstall XAMPP using the version 7.3.27. Also, try clear the cache before re-installing the XAMPP
Uninstall XAMPP 8.0.3
Got to Local disk (C)
Delete file xampp
Clear cache memory on webpage
Right click Local Disk (C) > Properties > Disk Cleaup > Check all > Ok
Install xampp 7.3.27
I hope that the above can be of help to you.
I had (maybe) the same issue. I first installed 8.x and then installed 7.4, but that didn't help.
When I tried to run the php.exe it showed an error on line 736 inside the php.ini.
I guess the problem was that XAMPP was installed to a location where a folder contained a space (Program Files (x86)). Under line 736 (maybe different for you) inside the php.ini the path was not put inside apostrophes. Slap some apostrophes on there and it should work.
Error inside php.ini
In my case,
I am facing such an issue when I have changed my php.ini (.../xampp/php.ini).
There are three php.ini files as
php.ini
php.ini-production
php.ini-development
I have replaced the php.ini file to php.ini-backup and rename php.ini-production to php.ini
so I have replaced back my php.ini-backup to php.ini and the issue is gone.
#ozzy has said is right,
but forgot to mention 1 main point (multiple installs)
this appears when this version of xampp is installed multiple times (without un-installing the previous).
uninstall the xampp being shown in programs list (programs and features).
restrated pc.
then deleted all the directories of xampp (may they be on any drive).
if the data is important, rename all xampp directories.
restarted pc.
installed xampp again.
-- thats all.

MySQL Workbench cannot open on Mac

MySQL Workbench on Mac (10.14) opens only for a moment and closes immediately without any (visible) error message. Re-installing it does not solve the problem.
What can I do to fix this problem?
MySQLWorkbench need Python3.7 Framework in /Library/Frameworks/Python.framework/Versions
brew install python#3.7
sudo cp -r /usr/local/Cellar/python#3.7/3.7.12/Frameworks/Python.framework/Versions/3.7 /Library/Frameworks/Python.framework/Versions
open MySQLWorkbench, it's work
One solution worked with me:
System Preferences -> Security & Privacy -> click “Open Anyway”.
And don't forget to unlock the Lock icon at the bottom left.
I solved downloading an older version of Workbench (8.0.20)
I faced this problem when my mac was updated to Monterey. I downloaded the workbench again from this link Official Mysql and installed it. I replaced the older workbench into my Applications and was able to retrieve servers i setup with the older workbench.
Cheers.
There are a couple of things potentially going on.
One is the Mac Security and Privacy control, addressed nicely by Mahmoud Mostafa in another answer.
But even once that's gotten around, there is the problem of where this app is looking for Python. Running Catalina 10.15.7, I used the terminal command suggested by Phil Nguyen and got a different error message:
Fatal Python error: initfsencoding: unable to load the file system codec, sys.path = ['/Applications/MySQLWorkbench.app/Contents/Resources/libraries', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload']
ModuleNotFoundError: No module named 'encodings'
To my surprise, I saw that there was no Python.framework within /Library/Frameworks/ at all. I'd been using Anaconda, which installed Python under my user directory.
As I had also installed Xcode tools, I just made a symbolic link* within /Library/Frameworks/ pointing to the Python framework at
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework
and changed the name of the symbolic link to Python.framework. That provides a Python 3.7 instead of forcing things back to Python 2 or using an old version of Workbench. Worked for me; YMMV.
*This needs to be a symbolic link made by ln -s in a Terminal window and not a Finder-generated alias. Working in /Library/Frameworks/ will require sudo.
I had the same issue as above. Downloading the older version from archives resolved the issue.
macOS Monterey, using version ( 8.0.29 ) solved the issue
Open your terminal and type:
/Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench --verbose
if your terminal said:
Your PYTHONPATH points to a site-packages dir for Python 3.x but you are running Python 2.x!
PYTHONPATH is currently: ":/Applications/MySQLWorkbench.app/Contents/Resources/libraries"
You should `unset PYTHONPATH` to fix this.
Type this:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages/
If you are using macOS 10.15 or lesser version just switch to older version of workbench(8.0.11), which is the stabile version and compatible with macOS 10.15 or lesser version. For download Click here
I upgraded the OS and I faced the issue with the Workbench. It was not loading. So, I downloaded it and installed it again. I got an option to keep both or replace them. I choose to Replace. This resolved the loading issue. Now, it's opening.
Try running the following command in your terminal, to remove the app from quarantine:
xattr -d com.apple.quarantine /path/to/MySQLWorkbench.app
Note that the default path is /Applications, i.e., the default filename is /Applications/MySQLWorkbench.app
I just installed newer version and it automatically replaced the old version and it worked!
/Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench --verbose
I opened with this command once and it after that it started opening normally.
PS I have python 3.7 installed
I also have faced a similar problem after upgrading MAC OS To Monterey,
The solution worked just upgrade your MySQL Workbench 8.0.30.
Link: https://dev.mysql.com/downloads/workbench/

MySQL doesn't start in xampp in mac osx

I'm on Max OS X Yosemite and have installed fresh version of XAMPP.
However, MySQL doesn't seem to start.
I've already looked in the '/Applications/XAMPP/xamppfiles/xampp' file and looks like 'unset DYLD_LIBRARY_PATH' is already there.
followed this thread here and killed the Mysql process but it also doesn't seem to work
When I execute this command
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
It throws an error
"Starting MySQL
... ERROR! The server quit without updating PID file (/Applications/XAMPP/xamppfiles/var/mysql/MacBook-Pro.local.pid)."
How should I fix this?
For me help this fix.
Step 1: Go to your Finder and edit the file as the following path below.
/Applications/XAMPP/xamppfiles/etc/my.cnf
Step 2: Open the file and find the [mysqld] section
add one line as following
innodb_force_recovery = 1
,and save.
Step 3: Run command in your Terminal
sudo /Applications/XAMPP/bin/mysql.server start
Wait until everything is OK.
Step 4: Edit the my.cnf again and remove the line you just added
innodb_force_recovery = 1
,and save.
Step 5: Stop for restart
sudo /Applications/XAMPP/bin/mysql.server stop
Wait until everything is OK.
Hello I 'm using Mac OS X as well, once used XAMPP but also gave me errors sometimes , I recommend MAMP has not given me any problems ever and is easy to deploy.

Apache not starting on MAMP Pro

Apache wont start and it throws an error:
OR
Apache couldn't be started. Please check the log file for more information.
dyld: Symbol not found: _iconv
Referenced from: /usr/lib/libmecabra.dylib
Expected in: /Applications/MAMP/Library/lib/libiconv.2.dylib
in /usr/lib/libmecabra.dylib
/Applications/MAMP/Library/bin/apachectl: line 80: 2799 Trace/BPT trap: 5 $HTTPD "$
This is the same for multiple ports. The reccomended MAMP ports AND the regular apache ports.
MySQL starts perfectly fine.
Any suggestions?
Locked. Comments on this answer have been disabled, but it is still accepting other interactions. Learn more.
I updated to the latest version of yosemite last night.
You apparently have to go to your MAMP folder in Applications. Go to bin -> apache2 -> bin.
Then rename the file from envvars to _envvars.
I also came across another problem of it not working correctly. Make sure the ports are Apache defaults, NOT MAMP defaults (port 80 etc). If it works straight away, this should not apply to you.
Installing the latest release of MAMP 3 Version 3.0.7.3 in my case seems to solve this issue.

Mac OS X, MySQL Preference Pane doesn't work

I downloaded and installed MySQL 5.1.47 for OS X 10.6 using the DMG archive:
mysql-5.1.47-osx10.6-x86_64.dmg
I also installed MySQL.prefPane and MySQLStartupItem.pkg. MySQL.prefPane is a Preference Pane. The problem is, whenever I attempt to start/stop MySQL from the Preference Pane, System Preferences just hangs. It runs at about 50% CPU forever, eventually I have for force quit System Preferences. The same thing happens if I toggle "Automatically Start MySQL Server on Startup". Basically the MySQL Preference Pane is not functional.
Note that I have no problem starting MySQL from the command line:
sudo /usr/local/mysql/bin/mysqld_safe
I have tried reinstalling MySQL and the Preference Pane. I'm using the standard installation location, nothing out of the ordinary. Every time the MySQL Preference Pane just hangs.
I'm doing this on a Macbook Pro (Intel) running OS X 10.6.3. There are no old versions of MySQL on this machine.
Follow-up: Well it's now January 2012 so I figure I'd check to see if this has been fixed. I tried the latest MySQL 5.5.20 on OS X 10.6.8 and it's still broken - same behavior, it just hangs (had to force quit). I tried Jamie Wong's and carloandaya's suggestions, both did not work.
Under OS X Lion the following worked for me:
edit /usr/local/mysql/support-files/mysql.server
change lines ~ 46 & 47
basedir=
datadir=
to
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
For anyone still encountering this problem, see: http://bugs.mysql.com/bug.php?id=53232
Specifically, here's Rembert Oldenboom's response:
Issue still exists with mysql 5.5.8 on
brand new on mbp i7 2.8. With the
comments of others the fix was easy:
Edit
/usr/local/mysql/support-files/mysql.server
Search for "Set some defaults" about 4
lines down, replace the line
basedir=.
with
basedir=/usr/local/mysql
Then search for "Set pid file if not
given" about 3 lines down, replace the
line
mysqld_pid_file_path=$datadir/`hostname`.pid
with
mysqld_pid_file_path=$datadir/`/bin/hostname`.pid
Now the prefPane will work.
old stack overflow post! The world has changed a great deal, and I wanted to share my solution to this problem. The issue for me was the time zone tables AND Stephen's answers.
I did:
edit /usr/local/mysql/support-files/mysql.server
change lines ~ 46 & 47
basedir=
datadir=
to
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
AND updated my my.cnf.
I had a default-time-zone set to UTC. I had to comment out that line.
default-time-zone = UTC
to
# default-time-zone = UTC
Start server using plist file (check your plist path/name!):
sudo launchctl load -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
I then loaded MySQL time zone tables from Mac OS time zone files:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root --password="YOUR_PASSWORD_HERE" mysql
I then stopped MySQL and restarted using my plist file.
sudo launchctl unload -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
sudo launchctl load -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
After that, I was able to stop/start using the preference panel!
I've installed and re-installed MySQL 5.5.15 using some of the tips that I found on the net. I found that selecting "install for all users of this machine" rather than "install only for current user" after double-clicking the preferences pane installation from the .dmg file makes it work. It's the only step that I changed in my many installations of MySQL on Snow Leopard.
Are you sure that panther supports 64 bits apps ?
Seems that when a I'm trying to open a 32 bits preference pane on snow leopard, the preference pane says "well this pane is 32bits, and you've got a 64bits macos, I'm restarting this pane"
Maybe it's hanging because it's the opposite ? getting 32bits preference pane and trying to open a 64bits pane ?
I had this problem too. It turned out that I installed the 32 bit MySQL server on my 64 bit Mac on accident. Woops! I would recommend verifying your processor type (32 or 64 bit) and reinstalling the according MySQL DMG.
It took me a couple of days to figure this out! MySQL was still running fine in the background, it's just the preference pane and connecting to it via terminal that would not work.
I hope this works for you!
This worked for me :
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
Problem I recognised was of permission to mysql.server
Other solutions here didn't work for me, but I cobbled together my own solution with the help of this bug ticket: https://bugs.mysql.com/bug.php?id=28854 (specifically the comment by BuB Javier)
The trick was twofold:
Create a /bin/pidof file using the code from http://www.cs.cmu.edu/~benhdj/Mac/unix.html
#!/bin/sh
ps axc|awk "{if (\$5==\"$1\") print \$1}"|tr '\n' ' '
Make sure it's executable.
Create a /etc/my.conf or ~/.my.conf file with the pid-file option specifying the path to the PID file (e.g. /usr/local/mysql/data/`hostname`.pid). (This is easy to do within MySQLWorkbench.)
I discovered this after trying to stop the server in MySQLWorkbench and it throwing "PID file not found!" error messages. Apparently specifying the pid-file location in the mysql.server file doesn't work.
I did change some permissions to _mysql:wheel here and there as frequently suggested, but I'm not sure that mattered in my case. After doing the two steps above, the preference pane was working again. If it doesn't work for you, try changing some file permissions.
MySQL 5.6.25 Community Server (64bit)
Mac OS X Mavericks (10.9.5)