hi im on ubuntu 8.0r lts, installed rails 2.3.4 ruby gem 1.3.5 mysql 5.0 when i rails myapp =>creates an sqllite3 environment and works good when i rails myapp -d mysql have an error when run db:create Couldn''t create database for {"socket"=>"/var/run/mysqld/mysqld.sock", "reconnect"=>false, "encoding"=>"utf8", "username"=>"root", "adapter"=>"mysql", "password"=>"difahu", "database"=>"a4_development", "pool"=>5}, charset: utf8, collation: utf8_unicode_ci (if you set the charset manually, make sure you have a matching collation) i can access mysql , irb, individually without problem somebody knows what happens???? -- Posted via http://www.ruby-forum.com/.
I have seen the fix for this be one of the following: if you have charset: utf8 change that to encoding or use 127.0.0.1 and not localhost or permissions for the user in the database (create table is a good one to have... ) On Sep 22, 4:52 pm, Daniel Hutchinson <rails-mailing-l...@andreas- s.net> wrote:> hi > im on ubuntu 8.0r lts, installed rails 2.3.4 ruby gem 1.3.5 mysql > 5.0 > > when i rails myapp =>creates an sqllite3 environment and works good > when i rails myapp -d mysql have an error when run db:create > > Couldn''t create database for {"socket"=>"/var/run/mysqld/mysqld.sock", > "reconnect"=>false, "encoding"=>"utf8", "username"=>"root", > "adapter"=>"mysql", "password"=>"difahu", "database"=>"a4_development", > "pool"=>5}, charset: utf8, collation: utf8_unicode_ci (if you set the > charset manually, make sure you have a matching collation) > > i can access mysql , irb, individually without problem > > somebody knows what happens???? > -- > Posted viahttp://www.ruby-forum.com/.
heimdull wrote:> I have seen the fix for this be one of the following: > > if you have charset: utf8 change that to encoding > or use 127.0.0.1 and not localhost > or permissions for the user in the database (create table is a good > one to have... ) > > On Sep 22, 4:52�pm, Daniel Hutchinson <rails-mailing-l...@andreas-Thanks a lot! heimdull for the answer . Im a beginner i RoR and I come from Visual Fox->SQL platform . I tried as you said. And I get the next line messages (above) if you see ( and I did not) the service start at 0.0.0.0:3000 and another line I didnt see either is "Client does not support authentication protocol requested by server; consider upgrading MySQL client" So if you or another can make me easy the way thanks, I will looking for now with this data something more Thanks Again for your help -----------------------LINE MESSAGES ------------------------------------------- dhd@dhd-desktop:~/a4$ script/server => Booting Mongrel => Rails 2.3.4 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server /!\ FAILSAFE /!\ Wed Sep 23 09:33:50 -0500 2009 Status: 500 Internal Server Error Client does not support authentication protocol requested by server; consider upgrading MySQL client /usr/lib/ruby/1.8/mysql.rb:453:in `read'' /usr/lib/ruby/1.8/mysql.rb:130:in `real_connect'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:585:in `connect'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:199:in `initialize'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:71:in `new'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:71:in `mysql_connection'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout'' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:9:in `cache'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:28:in `call'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in `call'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/params_parser.rb:15:in `call'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:93:in `call'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/failsafe.rb:26:in `call'' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `synchronize'' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:114:in `call'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/reloader.rb:34:in `run'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:108:in `call'' /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/rack/static.rb:31:in `call'' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:46:in `call'' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in `each'' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in `call'' /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/rack/log_tailer.rb:17:in `call'' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in `call'' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in `call'' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:61:in `process'' /usr/lib/ruby/1.8/mongrel.rb:159:in `process_client'' /usr/lib/ruby/1.8/mongrel.rb:158:in `each'' /usr/lib/ruby/1.8/mongrel.rb:158:in `process_client'' /usr/lib/ruby/1.8/mongrel.rb:285:in `run'' /usr/lib/ruby/1.8/mongrel.rb:285:in `initialize'' /usr/lib/ruby/1.8/mongrel.rb:285:in `new'' /usr/lib/ruby/1.8/mongrel.rb:285:in `run'' /usr/lib/ruby/1.8/mongrel.rb:268:in `initialize'' /usr/lib/ruby/1.8/mongrel.rb:268:in `new'' /usr/lib/ruby/1.8/mongrel.rb:268:in `run'' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:34:in `run'' /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/commands/server.rb:111 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' script/server:3 -- Posted via http://www.ruby-forum.com/.
Daniel Hutchinson wrote: Solved! I decide to new post because I posted with MySQL title which dont say nothing about the real problem So when i get the message "Client does not support authentication protocol requested by server;> consider upgrading MySQL client"or after run rake db:create get error message "could create table....." ---------------------------------------------------- after spend time I and look carefully the messages google the message "Client does not support..." and found the next link http://www.buayacorp.com/archivos/client-does-not-support-authentication-protocol-requested-by-server/#commentform where Braulio teach why is the problem and how to solve it is something about authentication protocol issue with mysql 4.1. -> 5.0 and rails 2.3.4 and solve as this get into mysql $mysql -u root -p enter your pwd and then enter the line SET PASSWORD FOR ''root''@''localhost'' = OLD_PASSWORD(''pwd''); and thats it! quit the mysql session run rake db:migrate then script/server get into localhost:3000 and is working now slds -- Posted via http://www.ruby-forum.com/.