0

Just installed snow leopard and Xcode, i downloaded version 5.1.38 from the mysql website and installed it, then i ran sudo gem uninstall mysql and when i try to gem install mysql as below i get a documentation error, also when i try to run mysql by simply typing mysql into terminal i get -bash: mysql: command not found. When i try to connect via MySql Administrator (gui) and also through my ruby on rails app i get Can't connect to local MySQL server through socket '/tmp/mysql.sock. Any suggestions?

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


Building native extensions.  This could take a while...
Successfully installed mysql-2.8.1
1 gem installed
Installing ri documentation for mysql-2.8.1...

No definition for next_result

No definition for field_name

No definition for field_table

No definition for field_def

No definition for field_type

No definition for field_length

No definition for field_max_length

No definition for field_flags

No definition for field_decimals

No definition for time_inspect

No definition for time_to_s

No definition for time_get_year

No definition for time_get_month

No definition for time_get_day

No definition for time_get_hour

No definition for time_get_minute

No definition for time_get_second

No definition for time_get_neg

No definition for time_get_second_part

No definition for time_set_year

No definition for time_set_month

No definition for time_set_day

No definition for time_set_hour

No definition for time_set_minute

No definition for time_set_second

No definition for time_set_neg

No definition for time_set_second_part

No definition for time_equal

No definition for error_errno

No definition for error_sqlstate
Installing RDoc documentation for mysql-2.8.1...

No definition for next_result

No definition for field_name

No definition for field_table

No definition for field_def

No definition for field_type

No definition for field_length

No definition for field_max_length

No definition for field_flags

No definition for field_decimals

No definition for time_inspect

No definition for time_to_s

No definition for time_get_year

No definition for time_get_month

No definition for time_get_day

No definition for time_get_hour

No definition for time_get_minute

No definition for time_get_second

No definition for time_get_neg

No definition for time_get_second_part

No definition for time_set_year

No definition for time_set_month

No definition for time_set_day

No definition for time_set_hour

No definition for time_set_minute

No definition for time_set_second

No definition for time_set_neg

No definition for time_set_second_part

No definition for time_equal

No definition for error_errno

No definition for error_sqlstate
Schneems
  • 14,918
  • 9
  • 57
  • 84
  • the problem was that the old MySQL was still running, go into system preferences >> mysql and "stop mysql server" once done, perform steps in the post below, and start the mysql server through system preferences. Thanks for the responses. – Schneems Sep 09 '09 at 15:42

3 Answers3

1

Me and my team member successfully following steps from http://weblog.rubyonrails.org/2009/8/30/upgrading-to-snow-leopard

but rather than update MacPort, We re-install it from dmg file. The Rubygems by get it update manually

sudo gem install rubygems-update
Jirapong
  • 24,074
  • 10
  • 54
  • 72
0

Snow Leopard screws up Mac Ports and MySQL. There's another SO question about it here.

Community
  • 1
  • 1
Evan Meagher
  • 4,517
  • 21
  • 18
0

Ok, i found my answer here: http://forums.mysql.com/read.php?116,359591,359591#msg-359591

Make sure you read all the post.

The author says specifically:

"So what you're looking for here is not a universal, "right instruction" to install the mysql gem; what we need is universal instruction to build the right instruction for our particular gem and MySQL installation."

For me the right solution was:

sudo env ARCHFLAGS="-arch x86_64" gem install mysql --no-rdoc --no-ri -- --with-mysql-config=/usr/local/mysql/bin/mysql_config 
workdreamer
  • 2,836
  • 1
  • 35
  • 37