This project is archived and is in readonly mode.

#2003 ✓invalid
Marty Haught

rake db:create fails for mysql

Reported by Marty Haught | February 18th, 2009 @ 03:36 AM | in 2.x

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.

Comments and changes to this ticket

  • Pratik

    Pratik March 8th, 2009 @ 04:36 PM

    • Assigned user set to “Pratik”
    • State changed from “new” to “invalid”

    Looks like a permission issue. Works for me.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages