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)
Related
There are red dots, rather than green dots, next to "Active Instance" in the preference pane. Image here. When I click "Start MySQL Server" the lights flash green very briefly before turning red again. In other install tutorials (e.g. this), this doesn't happen.
However, when I try to use command line to start the server, with sudo launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist I get the line /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist: service already loaded Load failed: 37: Operation already in progress. So it seems like some parts are already loaded.
When I try to launch MySQL (with mysql -u root -p), I get the error:
dyld: Symbol not found: __ZTTNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE Referenced from: /usr/local/mysql/bin/mysql (which was built for Mac OS X 12.0) Expected in: /usr/lib/libc++.1.dylib in /usr/local/mysql/bin/mysql Abort trap: 6
I get the same error when I try to do mysql --version.
Previously, I was getting the error -bash: mysql: command not found, but then I followed the suggestion here and added the path export PATH=$PATH:/usr/local/mysql/bin. (Note that I still get the -bash: mysql.server: command not found when I try mysql.server start, so I don't know if the new path export fixed the problem altogether.) I re-installed MySQL from the DMG but still getting this error.
Additional information that may be relevant:
-I am on Mac OS X 11.6.5.
-I have uninstalled/re-installed MySQL several times
-I copied my.cnf and put it in the "Configuration File" spot in preferences, with the file path: /private/etc/my.cnf. This is also a part where it's possible I went wrong, since I don't exactly know what I'm doing; I just tried to follow directions from here, here and used the actual code from here. I also tried putting the my.cnf file in /usr/local/mysql, as some other sources seem to suggest. This did not work either.
Solved: what I needed to do was uninstall MySQL and instead download an archived version of it--8.0.24 instead of the latest, 8.0.32, because it hadn't been compatible with my Mac version.
I'm running Fedora 35 on a Dell Precision 3541, dual booted with Windows 10. Total storage for the system is 1TB, the storage dedicated to Fedora is about 650 GB. The system has 16GB of RAM. The desktop is Gnome.
Whenever I try to launch Google Chrome, Chrome begins to load for a few seconds, then I get logged out of Fedora.
I tried reinstalling both Fedora 35 and Windows 10; the problem remains. Both OSes were reinstalled from the same media as the original installs.
When I ran:
journalctl | grep error,
lines such as:
Dec 27 19:51:44 fedora kernel: BTRFS error (device sda10): bdev /dev/sda10 errs: wr 0, rd 0, flush 0, corrupt 806, gen 0
dominated the output.
The output of:
mount | grep sda10
is
/dev/sda10 on / type btrfs (rw,relatime,seclabel,compress=zstd:1,space_cache,subvolid=258,subvol=/root)
/dev/sda10 on /home type btrfs (rw,relatime,seclabel,compress=zstd:1,space_cache,subvolid=256,subvol=/home)
Running:
ls -a /dev/sda10
outputs nothing.
I've tried uninstalling and reinstalling Chrome, with no effect.
Also, after I'd been having these problems for several days, the system firmware was updated. The updates had no visible effect on my issues.
ABRT reports that the failing component is gnome-shell.
I installed KDE Plasma and switched to it using switchdesk. The effect of this was to add new issues on top of the original one, which remained unaffected.
I reinstalled gnome-shell, and switched back to gnome.
I have two questions:
Does the "corrupt 806" in the output of journalctl above refer to a hardware or software error?
Can anyone point me to resources that will help me solve my issue(s)?
Many thanks in advance for your help or advice.
If you want to use old /home/username, best thing to do before adding it to newer installed GNU/Linux is to remove folder ~/.config, ~/.local, ~/.cache, any ~/.bashrc*, and any other dot files.
I think I've figured out the root of the issue, and a solution that fixes at least some of the problems I've been having.
My last Fedora installation was Fe33, and my user name was userA.
Before upgrading to Fe35, I backed up /home to an external drive.
Then I installed Fe35, and as it happens, used a different user name, userB.
Then I restored the contents of /home. :-(
This left me with thousands of text files, as well as environment variables, containing the path /home/userA. What a mess!
What I've done as a workaround is, in /home, run sudo ln -s userB userA.
That has solved a lot of problems; others might perhaps be fixed by updating environment variables, and removing and reinstalling programs, such as Chrome, which have not been working for me.
Not sure, but maybe you should update your BIOS first from Windows.
Download here: Dell Precision 3541.
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/
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.
[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.