# Receiving Authentication Error

**URL:** <https://www.ruby-forum.com/t/receiving-authentication-error/173187>\
**Category:** Rails\
**Created:** [August 4, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/receiving-authentication-error/173187 "2009-08-04T17:54:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![monocat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc348/32.png) [@monocat](https://www.ruby-forum.com/u/monocat)\
**Post date:** [August 4, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/receiving-authentication-error/173187/1 "2009-08-04T17:54:51Z")

</div>

Hi. A newbie. I installed/upgraded all the proper (at least that I know  
of) apps needed to run ruby on rails on a mac, but keep receiving mysql  
errors. The default page works fine, but as soon as I try a simple  
“hello world” controller that I’m testing, I keep getting different  
errors.

Current one after researching forums and trying to troubleshoot the  
problem, I’m stuck on a “Status: 500 Internal Server Error  
Client does not support authentication protocol requested by server;  
consider upgrading MySQL client” I am upgraded to the latest. What  
gives? And I did assign a password to the root and "sudo gem install  
mysql – --with-mysql-dir=/usr/local/mysql’

My mac is os x 10.5.7  
Ruby 1.8.7  
Rails 2.3.3  
Gem 1.3.5  
MySQL 5.1.37

Here’s an excerpt copy of the error from the development.log:  
!\ FAILSAFE /!\ Tue Aug 04 08:10:08 -0700 2009  
Status: 500 Internal Server Error  
Client does not support authentication protocol requested by server;  
consider upgrading MySQL client  
/usr/local/lib/ruby/1.8/mysql.rb:453:in `read' /usr/local/lib/ruby/1.8/mysql.rb:130:in`real\_connect’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active\_record/connection\_adapters/mysql\_adapter.rb:576:in  
`connect' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/connection_adapters/mysql_adapter.rb:204:in`initialize’

I have also properly updated the database.yml and have added the root  
password

Any thoughts? Appreciated.

---

<div class="post-metadata">

**Author:** ![monocat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc348/32.png) [@monocat](https://www.ruby-forum.com/u/monocat)\
**Post date:** [August 5, 2009, 2:44pm UTC](https://www.ruby-forum.com/t/receiving-authentication-error/173187/2 "2009-08-05T14:44:17Z")

</div>

Did you build the mysql gem with the correct version of the mysql  
client library? try the – --with-mysql-config=/path\_to/mysql\_config  
option and make sure it is the right version?

On Aug 4, 8:54 pm, Mosses A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![monocat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc348/32.png) [@monocat](https://www.ruby-forum.com/u/monocat)\
**Post date:** [August 5, 2009, 5:39pm UTC](https://www.ruby-forum.com/t/receiving-authentication-error/173187/3 "2009-08-05T17:39:58Z")

</div>

Thanks Mukund- but that didn’t do the trick either. This is what I did:  
sudo gem install mysql –  
–with-mysql-config=/usr/local/mysql-5.1.37-osx10.5-x86/bin/mysql-config

Even went back and tried:  
sudo gem install mysql –  
–with-mysql-dir=/usr/local/mysql-5.1.37-osx10.5-x86

Unfortunately nothing. Any other suggestions would be appreciated. I’ve  
been tackling this for few days now and can’t seem to resolve it. ☹

---

<div class="post-metadata">

**Author:** ![monocat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc348/32.png) [@monocat](https://www.ruby-forum.com/u/monocat)\
**Post date:** [August 6, 2009, 11:45am UTC](https://www.ruby-forum.com/t/receiving-authentication-error/173187/4 "2009-08-06T11:45:41Z")

</div>

On Aug 4, 4:54 pm, Mosses A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> gives? And I did assign a password to the root and "sudo gem install  
> mysql – --with-mysql-dir=/usr/local/mysql’

Well for some reason you’re not using the gem you built - it’s falling  
back to a pure ruby version of the mysql driver ( in /usr/local/lib/  
ruby/1.8/mysql.rb ) which by the sounds of it is rather old (either  
that or it is finding the pure ruby one first - can’t remember in what  
order ruby will find things)

Fred

---

<div class="post-metadata">

**Author:** ![monocat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc348/32.png) [@monocat](https://www.ruby-forum.com/u/monocat)\
**Post date:** [August 6, 2009, 4:57pm UTC](https://www.ruby-forum.com/t/receiving-authentication-error/173187/5 "2009-08-06T16:57:15Z")

</div>

@raul

I got it to work barely yesterday night. I took someone’s advice off of  
another forum and re-installed Xcode from Apple. Then I upgraded MySQL  
again since I had downgraded due to testing different versions. For some  
reason this time around it finally worked.

Good luck!

---

<div class="post-metadata">

**Author:** ![monocat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc348/32.png) [@monocat](https://www.ruby-forum.com/u/monocat)\
**Post date:** [August 6, 2009, 11:52am UTC](https://www.ruby-forum.com/t/receiving-authentication-error/173187/6 "2009-08-06T11:52:43Z")

</div>

Mosses,

Did you had any luck? I am having the same problem. It does not happen  
when I connect to localhost as root it only happend on a remote server  
though. I tried multiple versions of mysql, 5+ and multiple ways of  
installing mysql gem without any luck.

On Aug 5, 5:39 pm, Mosses A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
