Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 500161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:03:33+00:00 2026-05-13T06:03:33+00:00

It´s really a hard job figuring out how to get MySQL and mysql gem

  • 0

It´s really a hard job figuring out how to get MySQL and mysql gem up and running on Snow Leopard 10.6.2. I followed the instructions of various posts but was not successful yet:

I build MySQL Version 5.1.39 from source and it installed successfully. When trying to login using (mysql -u root -p) mysql returned the following error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

that obviously meant that the MySQL Server (mysqld) was not running.

which mysql: /usr/local/mysql/bin/mysql
which ruby: ruby 1.8.7 (2009-04-08 patchlevel 160) [i686-darwin9])
gem -v: 1.3.5
mysql: Server version: 5.1.39 MySQL Community Server (GPL)

After a lot of googling around, I found out that

  1. this command can start mysqld:

    sudo /usr/local/mysql/bin/mysqld_safe --user=mysql &

  2. The Preference Pane MySQL Tool is probably broken in Mac OS X 10.5 and higher

  3. This command should install the mysql gem correctly on Snow Leopard:

    sudo gem uninstall mysql
    sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

It ended up that I got the following error using something like rake db:create:

dyld: lazy symbol binding failed: Symbol not found: _mysql_init 
Referenced from: /opt/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle 
Expected in: flat namespace 
dyld: Symbol not found: _mysql_init 
Referenced from: /opt/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle 
Expected in: flat namespace

This error led me to the following post: http://cho.hapgoods.com/wordpress/?p=158, that basically tells me that the Ruby Version that came together with XCode 3.0 does not work in 64bit environments and a solution could be to install the 32bit versionof MySQL.

Any suggestions, how to proceed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:03:33+00:00Added an answer on May 13, 2026 at 6:03 am

    While building from source is not necessarily a bad idea, even if the official distribution is built using a better compiler, using MacPorts (http://www.macports.org/install.php) to do it is probably a better idea than a self-built installation.

    Although you can wrangle the OS X supplied Ruby and MySQL into shape, in my experience it’s easier to work entirely within the MacPorts realm (/opt) and leave your original distribution unmolested.

    A further advantage is you get a more up-to-date Ruby executable. 10.6 ships with 1.8.7p72 where MacPorts provides 1.8.7p174, for instance.

    Example:

    sudo port install mysql5
    sudo port install mysql5-server
    sudo port install rb-mysql
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a really hard time writing a SELECT query to get a
I'm finding it really hard to get the JS callback concept. I understand it
I am having a really hard time trying to get this to work. All
I am having a really hard time attempting to debug LINQ to SQL and
I am having a really hard time reconciling IoC, interfaces, and events. Let's see
I'm having a really hard time understanding delegates and object inheritance (if I may
I find NSLog() statements really hard to read because of the verbose date. Is
I am having a really hard time getting this to work. I have two
I just start playing with GWT I'm having a really hard time to make
In software companies I have seen it's really hard to work on very large

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.