DYLD_LIBRARY_PATH='/usr/local/mysql/lib:$DYLD_LIBRARY_PATH' DYLD_LIBRARY_PATH='/usr/local/mysql/lib:$DYLD_LIBRARY_PATH' • The hard, do-it-again-someday way: modify the.bundle files within the gem to use an absolute path to the MySQL client library. The fix is lost when reinstalling the gem or updating to a new version and must be reapplied. Change to your gem’s root, somewhere like /Library/Ruby/Gems/1.8/gems/mysql-2.8.1 or./mysql2-0.2.6, or even both. There are two.bundle files within the gem (under lib and ext) that you must run the following command on.
Download Mysql for Mac. Free and safe download. Download the latest version of the top software, games, programs and apps in 2018. MySQL GUI Tools (Archived Versions) Please note that development of MySQL GUI Tools has been discontinued. Download MySQL Workbench.
$ sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql/lib/libmysqlclient.16.dylib mysql_api.bundle $ sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql/lib/libmysqlclient.16.dylib mysql_api.bundle The second problem with the MySQL 5.5 packages is in the MySQLStartupItem and preference pane. Neither work to start or stop the server. • The ownership of the StartupItem files is wrong. OS X complains with “/Library/StartupItems/MySQLCOM” has not been started because it does not have the proper security settings. To fix that, run. Dyld: DYLD_ environment variables being ignored because main executable (.) is setuid or setgid dyld: DYLD_ environment variables being ignored because main executable (.) is setuid or setgid Ruby developers using Phusion Passenger Standalone will see this message displayed in their console every five seconds.
Please note that these are old versions. New releases will have recent bug fixes and features! To download the latest release of MySQL Community Server, please visit MySQL Downloads. I'm attempting to install a previous version of MySql (5.5.31) on my Mac OSX device running 10.9 Mavericks. I have been told this is possible, however, I cannot seem to locate a download for 5.5.31.
It gets really irritating, very fast. I have filed a bug with Apple. In the meantime, there is also a third way to fix the client library path problem that doesn’t require setting DYLD_LIBRARY_PATH (working around this 10.8 issue) or hacking.bundle files with install_name_tool: • $ brew install mysql. May 3, 2011 I haven’t run into this specific problem myself, so I can’t give you any definite answers. Googling around points to an architecture mismatch between Ruby and MySQL. They must be the same, either 32- or 64-bit. I suggest you double check your Ruby from Activity Monitor (be sure to turn on the Kind column; “Intel” is 32-bit and “Intel (64-bit)” is obviously 64-bit).
Running irb should be enough for that. Check the MySQL server process, too. After that, verify that there aren’t any old versions of the mysql2 gem or a MySQL server on your system. If there are, remove them and re-install the gem. If you have an old MySQL server, the gem might be linking against it at build time, then trying to dynamically load the newer library (because of DYLD_LIBRARY_PATH) at runtime. If you find a solution to your problem, let me know here and I’ll update the post with the fix.
July 28, 2011 Steve: thank you for the original post, helped me greatly in repairing my local Rails and Passenger setup under Lion. Upgrading to Lion bit me on some other database connection problems, which is why I upgraded to MySQL 5.5 in the first place, running into the.dylib reference problem mentioned here. Weston T: tried your.plist solution first, but unfortunately didn’t get it to work, not immediately and not after a restart. Had to go for the install_name_tool, which has its drawbacks when upgrading, but works great for now.
Mark July 10, 2011 Hello – I am still having some problems with this. I am new to rails development so it might be that I am missing something easily overlooked. Anyways, I get the error noted above and I have added the following to my.bash_profile: export DYLD_LIBRARY_PATH=”/usr/local/mysql/lib:$DYLD_LIBRARY_PATH” I then tried to run this command: sudo chown -R root:wheel /Library/StartupItems/MySQLCOM and i would get the command not found, which I’m assuming is because i do not have a startpitems folder? Please let me know if you have any suggestions. Richard Yaker July 28, 2011 I too am new to RUBY and am trying to do this on Lion 10.7 final.
I am also getting the. Dyld: lazy symbol binding failed: Symbol not found: _mysql_get_client_info Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.6/lib/mysql2/mysql2.bundle Expected in: flat namespace dyld: Symbol not found: _mysql_get_client_info Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.6/lib/mysql2/mysql2.bundle Expected in: flat namespace Trace/BPT trap: 5 Even after setting export DYLD_LIBRARY_PATH=”/usr/local/mysql/lib:$DYLD_LIBRARY_PATH” Has anyone solved this yet. July 19, 2011 Thanks a ton for the install_name_tool command! FWIW, while both ways of getting around this have their merits, in my experience the DYLD_LIBRARY_PATH command is more likely to not cover all your cases. Download Windows Os On Mac there. For instance, if you’re going to try and run things under the Apache2 that the system runs, you’re better off to just fix the software once rather than have to modify an environment you don’t control directly.
However, as you said either way the best fix would be for the MySQL library to use an absolute path in the first place •.