Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

rake db:create fails for mysql

#2003

Now that I have upgraded to Rails 2.3 (RC1) my db:create or db:create:all no longer works for a new mysql. Here is the error I get:

Couldn't create database for {"username"=>"...", "adapter"=>"mysql", "host"=>"localhost", "password"=>"...", "database"=>"my_development", "pool"=>5}, charset: utf8, collation: utf8_general_ci (if you set the charset manually, make sure you have a matching collation)

I was running mysql 5.1.31 and I am not specifying charset or collation in my database.yml. I am running on Leopard 10.5.6 with the latest mysql gem, 2.7 installed.

If I manually create my db with the following command:

CREATE DATABASE my_development CHARACTER SET utf8 COLLATE utf8_general_ci;

It connects fine. But if I drop and then try creating again it works. This seems like a bug to me as db:create should work the first time, AFAIK.

Reported by Marty Haught · February 18th, 2009 @ 03:36 AM

State: invalid
Milestone: 2.x
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Pratik
    Pratik
    • Assigned user set to Pratik
    • State changed from new to invalid

    Looks like a permission issue. Works for me.

    March 8th, 2009 @ 04:36 PM