0
votes

I have been trying to create the development and test databases in Redmine, with rake db:create:all, but I have receive the following error :

Couldn't create database for {"encoding"=>"utf8",
 "username"=>"bitnami", "adapter"=>"mysql",
 "database"=>"redmine_development", "host"=>"localhost",
 "password"=>"e06fad54d8",
 "socket"=>"/home/tudor/redmine-1.2.0-0/mysql/tmp/mysql.sock"},
charset: utf8, collation: utf8_unicode_ci (if you set the charset
manually, make sure you have a matching collation) rake aborted! Don't
know how to build task 'development'

This is my database.yml file

production:   
  adapter: mysql   
  database: bitnami_redmine   
  host: localhost   
  username: bitnami
  password: ********   
  socket: /home/tudor/redmine-1.2.0-0/mysql/tmp/mysql.sock   
  encoding: utf8

development:   
  adapter: mysql   
  database: redmine_development   
  host: localhost   
  username: bitnami   
  password: *********   
  socket: /home/tudor/redmine-1.2.0-0/mysql/tmp/mysql.sock   
  encoding: utf8

I've checked that mysql is turned on. The production database is created by default, the problem is with the development one. One possible source of error that I found while reading other forums is using tab instead of two spaces in my database.yml, but that's not the case here.

Testing configuration :

  • Ubuntu 11.04 Redmine v. 1.2.0 Ruby v. 1.8.7 Rake v. 0.8.7 Rails v. 2.3.11
1
Run "mysql -u bitnami -pe06fad54d8" and see if you can login to mysql.Maurício Linhares
The login to the mysql database works. I must be missing something.user852689
Can you try removing the socket reference?Maurício Linhares
I have removed the lines with socket: from database.yml, but I'm getting the same error when I run rake db:create:all. Could it be an issue with mysql?user852689
I think it's unliley, i have a db file that's just like yours - gist.github.com/1110273 and it works.Maurício Linhares

1 Answers

1
votes

Make sure that your user has access to create the database in mysql, something like:

grant all on redmine_development.* to bitnami;

from the mysql console should hopefully do the trick.