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 7489081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:11:51+00:00 2026-05-29T15:11:51+00:00

I’ve installed MySQL 5.5 via the disk image on Mac OS X 10.7. I’ve

  • 0

I’ve installed MySQL 5.5 via the disk image on Mac OS X 10.7. I’ve also added /usr/local/mysql/bin to my path in .bash_profile.

which mysql returns /usr/local/mysql/bin/mysql

However, I can’t seem to get the server running, no matter whatever I try.

mysql -u root returns:

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

sudo /usr/local/mysql/bin/mysqld_safe starts and then immediately stops the daemon:

120130 23:18:57 mysqld_safe Logging to '/usr/local/mysql/data/Bryans-Macbook-Pro.local.err'.
120130 23:18:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
120130 23:18:59 mysqld_safe mysqld from pid file /usr/local/mysql/data/Bryans-Macbook-Pro.local.pid ended

I feel that I have tried every possible solution that can be found, and I am out of ideas now. I’ve even tried installing an older version of MySQL (5.1) and got the same results and efforts invain.

FURTHER INFORMATION

Running mysqld results in:

$ mysqld
120209  0:02:23 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-5.5.20-osx10.6-x86_64/data/ is case insensitive
120209  0:02:23 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Table 'mysql.plugin' doesn't exist
120209  0:02:23 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120209  0:02:23 InnoDB: The InnoDB memory heap is disabled
120209  0:02:23 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120209  0:02:23 InnoDB: Compressed tables use zlib 1.2.3
120209  0:02:23 InnoDB: Initializing buffer pool, size = 128.0M
120209  0:02:23 InnoDB: Completed initialization of buffer pool
120209  0:02:23 InnoDB: highest supported file format is Barracuda.
120209  0:02:23 InnoDB: 1.1.8 started; log sequence number 1595675
120209  0:02:23 [ERROR] mysqld: unknown option '--skip-locking'
120209  0:02:23 [ERROR] Aborting

120209  0:02:23  InnoDB: Starting shutdown...
120209  0:02:24  InnoDB: Shutdown completed; log sequence number 1595675
120209  0:02:24 [Note] mysqld: Shutdown complete

UPDATE

Well, I removed mysql completely from my system, re-installed an older version (5.1), and it is actually starting up now. However, I still can’t run rails server. I get the following error:

/Users/bricker/.rvm/gems/ruby-1.8.7-p352/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle: dlopen(/Users/bricker/.rvm/gems/ruby-1.8.7-p352/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle, 9): Library not loaded: /opt/local/lib/mysql5/mysql/libmysqlclient_r.16.dylib (LoadError)

So, I’ve run this command:

sudo install_name_tool -change libmysqlclient_r.16.dylib /opt/local/lib/mysql5/mysql/libmysqlclient_r.16.dylib ~/.rvm/gems/ruby-1.8.7-p352/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle

But still receive the error when attempting to start the ‘rails server’.

UPDATE 2

Okay, final update: After everything, reinstalling mysql numerous times, seeing all these errors – it turns out that perhaps the original problem was a conflict between gems mysql2-0.2.7 and mysql2-0.3.11. To ultimately fix the problem:

  1. Removed all mysql-related files from my system (see bash script below)

  2. Installed MySQL 5.1.61 (64-bit) from the Disk Image provided on the MySQL website

  3. Ran the following lines:

sudo install_name_tool -change libmysqlclient_r.16.dylib /opt/local/lib/mysql5/mysql/libmysqlclient_r.16.dylib ~/.rvm/gems/ruby-1.8.7-p352/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle

sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql/lib/libmysqlclient.16.dylib ~/.rvm/gems/ruby-1.8.7-p352/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle

  1. ran gem uninstall mysql2, and selected the version 0.3.11 – the only version left on this RVM section is mysql2-0.2.7.

Now everything seems to be working! Thanks again for all the help.

Bash script to remove mysql-related files from Mac OS X (10.6 & 10.7).

#!/bin/bash
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
sudo rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /var/db/receipts/com.mysql.*
echo "Done."

Copy into remove-mysql.sh, make it executable (chmod +x remove-mysql.sh), and run it.

  • 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-29T15:11:52+00:00Added an answer on May 29, 2026 at 3:11 pm
    1. Run mysql_upgrade
    2. Remove skip-locking option from my.cnf: MySQL – what does skip-locking in my.cnf do?

    If you cannot find skip-locking in your my.cnf, that means that MySQL loads it from path different to your expectations. Double-check that.

    P.S. It seems that you upgraded your MySQL from some old version, aren’t you?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

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.