Unknown database 'redmine'

Added by jiankang chen 9 months ago

err:
C:\redmine>set RAILS_ENV=production

C:\redmine>rake db:migrate
rake aborted!
ActiveRecord::NoDatabaseError: Unknown database 'redmine'

Caused by:
Mysql2::Error: Unknown database 'redmine'

Tasks: TOP => db:migrate
(See full trace by running task with --trace)

database.yml:
production:
adapter: mysql2
database: redmine
host: localhost
username: root
password: ""
encoding: utf8

How to solve it?

Replies (4)

RE: Unknown database 'redmine' - Added by Martin Loučka 9 months ago

Hi, do you have a MySQL server running on your localhost with database 'redmine' created?

Best,
Martin

RE: Unknown database 'redmine' - Added by jiankang chen 9 months ago

Martin Loučka wrote:

Hi, do you have a MySQL server running on your localhost with database 'redmine' created?

Best,
Martin

Hi,Database 'redmine' has been created
I can connect to'MySQL' in the database
Attached is a screenshot of the database

1.PNG (4.16 KB)

RE: Unknown database 'redmine' - Added by Rafael Leite 9 months ago

Alter localhost to 127.0.0.1 and confirm your user and password of you mysql. Your port of connection mysql is 3306?

RE: Unknown database 'redmine' - Added by Amit Karsale 6 months ago

I am facing the same error while setting up a development environment on Mac OS. Can anyone help on this plz.

(1-4/4)