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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 10, 2004, at 1:45 PM, Curt Hibbs wrote:> 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? > > # Host: Local Database: cookbook > # ------------------------------------------------------ > # Server version 4.1.7-nt >Your server is 4.1.7 and it''s likely that your client is not. This error is what happens if you upgraded your server from 4.1.6gamma to 4.1.7, but then left the client at 4.1.6gamma or lesser. Or if you have a 4.1.7 server that you are trying to talk to remotely with an old client. What is the version number for mysqladmin (a client binary)? And was any ruby mysql libraries also updated when the server was updated to 4.1.7? - - Jason -----BEGIN PGP SIGNATURE----- Version: PGP 8.1 iQA/AwUBQZKOFlUyB+ajXkCLEQJcRACdG1wzVV8sTBZUVlH6xVtOn/JWwYcAoOCy Tu0F8sxQwLF1WMNGscDRZkmd =+Ya5 -----END PGP SIGNATURE-----
Jason Hoffman wrote:> > On Nov 10, 2004, at 1:45 PM, Curt Hibbs wrote: > > 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? > > > > # Host: Local Database: cookbook > > # ------------------------------------------------------ > > # Server version 4.1.7-nt > > > > Your server is 4.1.7 and it''s likely that your client is not. This > error is what happens if you upgraded your server from 4.1.6gamma to > 4.1.7, but then left the client at 4.1.6gamma or lesser. Or if you have > a 4.1.7 server that you are trying to talk to remotely with an old > client.That makes come sense as I just installed a new version of MySQL. So they really changed the authentication protocol in 4.1.7?> What is the version number for mysqladmin (a client binary)? And was > any ruby mysql libraries also updated when the server was updated to > 4.1.7?I don''t have mysqladmin. I used the "essential" installer for windows which just has the server and a command line client (and a config utility).> > - - Jason > > -----BEGIN PGP SIGNATURE----- > Version: PGP 8.1 > > iQA/AwUBQZKOFlUyB+ajXkCLEQJcRACdG1wzVV8sTBZUVlH6xVtOn/JWwYcAoOCy > Tu0F8sxQwLF1WMNGscDRZkmd > =+Ya5 > -----END PGP SIGNATURE----- > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.788 / Virus Database: 533 - Release Date: 11/1/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-bAttSoROYyI@public.gmane.org> 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-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >-- Aled Davies <awd-bAttSoROYyI@public.gmane.org> aim: aleddavieswb yahoo: aleddavieswb _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1>> Your server is 4.1.7 and it''s likely that your client is not. This >> error is what happens if you upgraded your server from 4.1.6gamma to >> 4.1.7, but then left the client at 4.1.6gamma or lesser. Or if you >> have >> a 4.1.7 server that you are trying to talk to remotely with an old >> client. > > That makes come sense as I just installed a new version of MySQL. > > So they really changed the authentication protocol in 4.1.7?Yes in 4.1.x, you can read about the "Client does not support authentication protocol" error here http://dev.mysql.com/doc/mysql/en/Old_client.html - - J -----BEGIN PGP SIGNATURE----- Version: PGP 8.1 iQA/AwUBQZK2bVUyB+ajXkCLEQIrRgCfWrfrMsvfMlXSB/n/+ZEsCvVMrDwAoK9N nIDNlXbMajO1ZWOc0cea6nD8 =QO32 -----END PGP SIGNATURE-----
Jason Hoffman wrote:> > > > So they really changed the authentication protocol in 4.1.7? > > Yes in 4.1.x, you can read about the "Client does not support > authentication protocol" error here > http://dev.mysql.com/doc/mysql/en/Old_client.htmlThanks for the link, tat was very helpful! Curt
Aled Davies wrote:> > 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. :) > > AledYeah, after reading the link that Jason provided I figured that would work, and it did! Thanks, Curt> -- > Aled Davies <awd-bAttSoROYyI@public.gmane.org> > 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-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > Aled Davies <awd-bAttSoROYyI@public.gmane.org> > aim: aleddavieswb > yahoo: aleddavieswb > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.788 / Virus Database: 533 - Release Date: 11/1/2004 >