Mysql error on server

I just updated to Rails 2.2.2 from 1.2.6 yesterday. Today I
reinstalled the mysql gem. Now when I try to run script/server the
server starts, but when I try to access my database in a browser
window get the following error:

dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
mysql.bundle
Expected in: dynamic lookup

dyld: Symbol not found: _mysql_init
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
mysql.bundle
Expected in: dynamic lookup

Trace/BPT trap

Any suggestions would be most appreciated.

Thanks!

jabauer wrote:

I just updated to Rails 2.2.2 from 1.2.6 yesterday. Today I
reinstalled the mysql gem. Now when I try to run script/server the
server starts, but when I try to access my database in a browser
window get the following error:

dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
mysql.bundle
Expected in: dynamic lookup

dyld: Symbol not found: _mysql_init
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
mysql.bundle
Expected in: dynamic lookup

Trace/BPT trap

Any suggestions would be most appreciated.

Thanks!

probably its version of mysql not this correct one

uninstall mysql following these steps:

  1. Open Terminal
  2. sudo nano /etc/hostconfig
  3. Delete the following line: “MYSQLCOM=-YES-”
  4. CTRL+x
  5. y
  6. CTRL+m
  7. Make sure MySQL is not running
  8. Open Terminal
  9. sudo rm /usr/local/mysql
  10. sudo rm -rf /usr/local/mysql *
  11. sudo rm -rf /Library/StartupItems/MySQLCOM
  12. sudo rm -rf /Library/PreferencePanes/My*
  13. sudo rm -rf /Library/Receipts/mysql*
  14. sudo rm -rf /Library/Receipts/MySQL*

installs the correct version, probably x386 or 32bits:
http://dev.mysql.com/downloads/mysql/5.1.html#downloads.

Open Terminal

sudo env ARCHFLAGS=“-arch i386” gem install mysql –
–wuth-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib
–with-mysql-include=/usr/local/mysql/include \
–with-mysql-config=/usr/local/mysql/bin/mysql_config

I’m getting the error after installing the mysql gem for rails 2.2.2 to
work, where all MySQL worked fine prior to this upgrade. Would this be
your suggestion even though MySQL was working prior to the mysql gem
installation?

probably its version of mysql not this correct one

uninstall mysql following these steps:

uninstall mysql following these steps:

  1. Open Terminal
  2. sudo nano /etc/hostconfig
  3. Delete the following line: “MYSQLCOM=-YES-”
  4. CTRL+x
  5. y
  6. CTRL+m
  7. Make sure MySQL is not running
  8. Open Terminal
  9. sudo rm /usr/local/mysql
  10. sudo rm -rf /usr/local/mysql *
  11. sudo rm -rf /Library/StartupItems/MySQLCOM
  12. sudo rm -rf /Library/PreferencePanes/My*
  13. sudo rm -rf /Library/Receipts/mysql*
  14. sudo rm -rf /Library/Receipts/MySQL*

I am new to ruby and just followed your commands to uninstall mysql.
Thanks a lot. Now half my hard drive, all my documents, all my code is
gone. And I don’t have a recent backup because my backup drive went down
recently. I have also lost the code for all the applications I have
written and as working on. These money I was making from these
applications is how I was going to afford college. Unless you can tell
me a way to get all my info back you are one stupid fuing ahole.

Kieran M. wrote:
[…]

I am new to ruby and just followed your commands to uninstall mysql.
Thanks a lot. Now half my hard drive, all my documents, all my code is
gone.

That’s awful, and I’m verry sorry to hear that. However, as an
otherwise uninvolved bystander, I will point these facts out.

  • Rodrigo’s advice was probably inaccurate.
  • One of his commands had what appears to be a typo making it into
    (basically) rm * , which clears the current directory.
  • This is a very basic error. Anyone (such as you) developing apps on a
    Unix system should be able to spot it immediately.
  • You were running commands that you didn’t really understand, without a
    usable backup.
  • When things went wrong, you started calling names in a public forum.

As I said above, I think it’s awful that Rodrigo’s mistake cost you so
much, but I figured I’d point out what you could have done differently.
Hopefully, this will prevent something similar from happening again.
Good luck!

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

First off I apologize for my language but I’m sure you can understand
how frustrated I was.

@Rick
I tried data recovery tools but they couldn’t find anything; all my
files were completely gone. I had to reinstall leopard but thanks for
the advice anyway.

On Wed, Jul 15, 2009 at 5:09 PM, Kieran M. <
[email protected]> wrote:

  1. Make sure MySQL is not running
    Thanks a lot. Now half my hard drive, all my documents, all my code is
    gone. And I don’t have a recent backup because my backup drive went down
    recently. I have also lost the code for all the applications I have
    written and as working on. These money I was making from these
    applications is how I was going to afford college. Unless you can tell
    me a way to get all my info back you are one stupid fuing ahole.

“These money I was making from these applications is how I was going to
afford college.”

I find this hard to believe. (still sucks if you ran step 10, though.)

If you don’t do much since the delete there might be some recovery tools
you
can use to get some stuff back.

jabauer wrote:

I just updated to Rails 2.2.2 from 1.2.6 yesterday. Today I
reinstalled the mysql gem. Now when I try to run script/server the
server starts, but when I try to access my database in a browser
window get the following error:

dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
mysql.bundle
Expected in: dynamic lookup

dyld: Symbol not found: _mysql_init
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
mysql.bundle
Expected in: dynamic lookup

Trace/BPT trap

Any suggestions would be most appreciated.

Thanks!

Please don’t use this article, you will lose your data / files.
I uses this article on my mac and have lost everything.

Why this Article is here, there is no warning.
Is it not possible to remove this article?

Raj G. wrote:

jabauer wrote:

I just updated to Rails 2.2.2 from 1.2.6 yesterday. Today I
reinstalled the mysql gem. Now when I try to run script/server the
server starts, but when I try to access my database in a browser
window get the following error:

dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
mysql.bundle
Expected in: dynamic lookup

dyld: Symbol not found: _mysql_init
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
mysql.bundle
Expected in: dynamic lookup

Trace/BPT trap

Any suggestions would be most appreciated.

Thanks!

Please don’t use this article, you will lose your data / files.
I uses this article on my mac and have lost everything.

Raj G. wrote:

Why this Article is here, there is no warning.
Is it not possible to remove this article?

Probably not. This forum is just a mirror of a mailing list.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

2009/7/16 Kieran M. [email protected]:

First off I apologize for my language but I’m sure you can understand
how frustrated I was.

@Rick
I tried data recovery tools but they couldn’t find anything; all my
files were completely gone. I had to reinstall leopard but thanks for
the advice anyway.

And the moral, which we all learn the hard way at least once in our
careers, is always have a backup. If there is a problem with the
backup system so backup is not possible then fixing that is more
important than continuing development.
Also check that the backup is actually working correctly by
occasionally doing a restore, in particular after any changes to the
backup system.

Little consolation now I know. Most of us have been there, those that
have not probably will at some point.

Colin

2009/12/22 Raj G. [email protected]:

Please don’t use this article, you will lose your data / files.
I uses this article on my mac and have lost everything.

Which article? I don’t see any article referenced in your post.

Colin

You received this message because you are subscribed to the Google
Groups “Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.