MySQL Forums
Forum List  »  Ruby

Re: Ruby and MySQL
Posted by: Jon Dean
Date: April 03, 2006 03:20AM

I am new to both ruby and mysql and am trying to install the API for mysql using the link I am using version 1.8.4 for ruby and 5.0.19-nt for mysql. Following the readme-winpkg I entered ruby install.rb -n and got
mingw32/ => c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt
I then ran the simple.rb
# simple.rb - simple MySQL script using Ruby MySQL module

require "mysql"

# connect to the MySQL server
dbh = Mysql.real_connect("localhost", "testuser", "testpass", "test")
# get server version string and display it
puts "Server version: " + dbh.get_server_info
rescue MysqlError => e
print "Error code: ", e.errno, "\n"
print "Error message: ", e.error, "\n"
# disconnect from server
from and got:
Error code:1251
Error message: Client does not support authentication protocol requested by server; consider upgrading mysql client
simple.rb:13: undefined method 'close' for nil:NilClass <NoMethodError>

Are there any suggestion on how I can get the ruby API for mysql installed and running?

Options: ReplyQuote

Written By
December 01, 2005 02:34AM
Re: Ruby and MySQL
April 03, 2006 03:20AM
April 08, 2006 06:47PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.