[Rails] MySQL Error
Aled Davies
awd at well.com
Thu Nov 11 00:30:44 GMT 2004
I had this error yesterday. I was using a custom username and password
for the db and kept getting this everytime it tried to connect. The
error went away when I configured Rails to log in using 'root' and no
password.
I would suggest trying that. :)
Aled
--
Aled Davies <awd at well.com>
aim: aleddavieswb
> I'm getting an error from Rails trying to connect to MySQL:
>
> Client does not support authentication protocol
> requested by server; consider upgrading MySQL client
>
> I've verified that the database name, user name and password are
> correct.
> Does anyone know why I might be getting this?
>
> I have a verify simple setup (I'm writing a tutorial). My controller
> looks
> like this:
>
> require 'abstract_application'
> require 'recipe_helper'
> class RecipeController < AbstractApplicationController
> include RecipeHelper
> scaffold :recipe
> end
>
> and my model looks like this:
>
> require 'active_record'
> class Recipe < ActiveRecord::Base
> end
>
> and my database looks like this:
>
> # Host: Local Database: cookbook
> # ------------------------------------------------------
> # Server version 4.1.7-nt
> CREATE TABLE `recipes` (
> `id` int(6) unsigned NOT NULL auto_increment,
> `title` varchar(255) NOT NULL default '',
> `instructions` text NOT NULL,
> PRIMARY KEY (`id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
>
> and I'm browsing to:
>
> http://127.0.0.1:3000/recipe/list
>
> I pasted the entire web server response below. I any ideas would be
> greatly
> appreciated.
>
> Thanks,
> Curt
>
> ##################
>
> Mysql::Error in Recipe#list
>
> Client does not support authentication protocol requested by server;
> consider upgrading MySQL client
>
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/
> vendor/m
> ysql.rb:452:in `read'
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/
> vendor/m
> ysql.rb:130:in `real_connect'
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/
> vendor/m
> ysql.rb:91:in `initialize'
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/
> vendor/m
> ysql.rb:1084:in `new'
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/
> vendor/m
> ysql.rb:1084:in `real_connect'
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/
> connecti
> on_adapters/mysql_adapter.rb:31:in `mysql_connection'
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/
> connecti
> on_adapters/abstract_adapter.rb:117:in `send'
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/
> connecti
> on_adapters/abstract_adapter.rb:117:in `connection='
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/
> connecti
> on_adapters/abstract_adapter.rb:81:in `retrieve_connection'
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/
> base.rb:
> 172:in `connection'
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/
> base.rb:
> 276:in `find_by_sql'
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/
> base.rb:
> 270:in `find_all'
> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/
> scaffo
> lding.rb:103:in `list'
> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/
> base.r
> b:563:in `send'
> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/
> base.r
> b:563:in `perform_action_without_filters'
> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/
> filter
> s.rb:236:in `perform_action_without_benchmark'
> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/
> benchm
> arking.rb:30:in `perform_action_without_rescue'
> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/
> benchm
> arking.rb:30:in `measure'
> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/
> benchm
> arking.rb:30:in `perform_action_without_rescue'
> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/
> rescue
> .rb:68:in `perform_action'
> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/
> base.r
> b:254:in `process'
> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/
> base.r
> b:235:in `process'
> c:/ruby/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher.rb:35:in
> `dispatch'
> /public/dispatch.rb:10
> /public/dispatch.rb:1:in `load'
> /public/dispatch.rb:1
> -:7
>
> Request
>
> Parameters: {"id"=>nil}
>
> Show session dump
>
> --- {}
>
> Response
> Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"}
>
> Show template parameters
>
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
--
Aled Davies <awd at well.com>
aim: aleddavieswb
yahoo: aleddavieswb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2353 bytes
Desc: not available
Url : http://one.textdrive.com/pipermail/rails/attachments/20041110/403b26ab/smime.bin
More information about the Rails
mailing list