# Ruby - mysql - Error Authentication protocol not supported

**URL:** <https://www.ruby-forum.com/t/ruby-mysql-error-authentication-protocol-not-supported/97645>\
**Category:** Ruby\
**Created:** [July 9, 2006, 2:03am UTC](https://www.ruby-forum.com/t/ruby-mysql-error-authentication-protocol-not-supported/97645 "2006-07-09T02:03:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 9, 2006, 2:03am UTC](https://www.ruby-forum.com/t/ruby-mysql-error-authentication-protocol-not-supported/97645/1 "2006-07-09T02:03:12Z")

</div>

On Windows XP Prof system, using Ruby 1.8.4 & mysql-ruby-2.7.1 (pure  
ruby interface),  
myswl 5.0 server, and rubyuser is defined as a mysql user, I am trying  
to run the following sample program and getting the error:

\*\*\* C:/ruby/lib/ruby/1.8/mysql.rb:453:in `read': Client does not support authentication protocol requested by server; consider upgrading MySQL client (Mysql::Error) from C:/ruby/lib/ruby/1.8/mysql.rb:130:in`real\_connect’  
from C:/ruby/lib/ruby/1.8/mysql.rb:91:in `initialize’  
from C:/0-dwn/mysql/ruby-mysql-0.2.6/sampledb0.rb:5

I am able to perform all of the commands via a commandline console.

Please help me with this error message, what do I need to change to get  
it working

Thanks,  
John

========Sampledb.rb =========================================

require “mysql”

dbname = “sampledb”

m = Mysql.new(“localhost”, “root”, “passwd”)  
r = m.query(“CREATE DATABASE #{dbname}”)  
m.select\_db(dbname)  
m.query(“CREATE TABLE words  
(  
german varchar(30),  
english varchar(30),  
french varchar(30)  
)”  
)

m.query(“INSERT INTO words VALUES(‘Adler’, ‘eagle’, ‘aigle’)”)  
m.query(“INSERT INTO words VALUES(‘Haus’, ‘house’, ‘maison’)”)  
m.query(“INSERT INTO words VALUES(‘Name’, ‘name’, ‘nom’)”)  
m.query(“INSERT INTO words VALUES(‘Wal’, ‘whale’, ‘baleine’)”)  
m.query(“GRANT ALL ON sampledb.\* TO rubyuser@localhost IDENTIFIED by  
‘ruby’”)

# m.close
