rake db:create:all works fine here: /mystest 741 > mysql --version mysql Ver 14.14 Distrib 5.1.31, for apple-darwin9.5.0 (powerpc) using readline 5.1 /mystest 742 > gem list mysql
*** LOCAL GEMS *** mysql (2.8.1) /mystest 743 > cat config/database.yml # MySQL. Versions 4.1 and 5.0 are recommended. # # Install the MySQL driver: # gem install mysql # On Mac OS X: # sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql # On Mac OS X Leopard: # sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql- config=/usr/local/mysql/bin/mysql_config # This sets the ARCHFLAGS environment variable to your native architecture # On Windows: # gem install mysql # Choose the win32 build. # Install MySQL and put its /bin directory on your path. # # And be sure to use new-style password hashing: # http://dev.mysql.com/doc/refman/5.0/en/old-client.html development: adapter: mysql encoding: utf8 reconnect: false database: mystest_development pool: 5 username: root password: host: localhost . . . NOTE: the gem installs with: sudo gem install mysql I can reproduce your error message if I hand in an incorrect username or password so I'm guessing the utf8 and matching collation is gibberish meant to confound the confusible;-() On Sep 7, 9:10 am, Kathy Koehler <[email protected]> wrote: > I can do a mysql -u root and then type in create database > restaurant_test, development, production but when I run > > rake db:create:all I get: > > (in > /Users/katherinekoehler/Documents/workspace/kkoehler/classes/ruby/lesson5/restaurant) > Couldn't create database for {"socket"=>"/tmp/mysql.sock", > "reconnect"=>false, "encoding"=>"utf8", "username"=>"root", > "adapter"=>"mysql", "host"=>"localhost", "password"=>nil, > "database"=>"restaurant_development", "pool"=>5}, charset: utf8, > collation: utf8_general_ci (if you set the charset manually, make sure > you have a matching collation) > Couldn't create database for {"socket"=>"/tmp/mysql.sock", > "reconnect"=>false, "encoding"=>"utf8", "username"=>"root", > "adapter"=>"mysql", "host"=>"localhost", "password"=>nil, > "database"=>"restaurant_production", "pool"=>5}, charset: utf8, > collation: utf8_general_ci (if you set the charset manually, make sure > you have a matching collation) > Couldn't create database for {"socket"=>"/tmp/mysql.sock", > "reconnect"=>false, "encoding"=>"utf8", "username"=>"root", > "adapter"=>"mysql", "host"=>"localhost", "password"=>nil, > "database"=>"restaurant_test", "pool"=>5}, charset: utf8, collation: > utf8_general_ci (if you set the charset manually, make sure you have a > matching collation) > > My .yml files: > > development: > adapter: mysql > encoding: utf8 > reconnect: false > database: restaurant_development > pool: 5 > username: root > password: > host: localhost > socket: /tmp/mysql.sock > > /tmp/mysql.sock exists > > My mysql process: > > 74 195 173 0 32:13.26 ?? 109:41.08 /sw/sbin/mysqld --basedir=/sw > --datadir=/sw/var/mysql --user=mysql > --pid-file=/sw/var/mysql/katherine-koehlers-macbook-pro.local.pid -u > root > > I also did a sudo gem update mysql-ruby to make sure I had the latest > libraries. > > I've spent hours on this. Any ideas? > > Kathy > -- > Posted viahttp://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

