Project

General

Profile

setup error for mysql using password

Added by John Z about 16 years ago

This is driving me nuts. I really want to run redmine, but I've spent days trying to get it running. Now I feel like I'm close to even trying it. But now this stupid error. Where is this root login coming from?

Redmine 0.6.3

/var/www/redmine# ruby script/server -e production

From the browser:
Mysql::Error in WelcomeController#index
Access denied for user 'root'@'localhost' (using password: NO)
RAILS_ROOT: /var/www/redmine/public/../config/..

from
/var/www/redmine/config/database.yml
  1. MySQL (default setup). Versions 4.1 and 5.0 are recommended. #
  2. Get the fast C bindings:
  3. gem install mysql
  4. (on OS X: gem install mysql -- --include=/usr/local/lib)
  5. And be sure to use new-style password hashing:
  6. http://dev.mysql.com/doc/refman/5.0/en/old-client.html

production:
adapter: mysql
database: redmine
host: localhost
username: jcz
password: password

  1. development:
  2. adapter: mysql
  3. database: redmine_development
  4. host: localhost
  5. username: rooter
  6. password:
  1. test:
  2. adapter: mysql
  3. database: redmine_test
  4. host: localhost
  5. username: roottest
  6. password:

Replies (3)

RE: setup error for mysql using password - Added by Thomas Lecavelier about 16 years ago

Rather strange... Can you post here relevant extract from your log/production.log file please? It should be something weird during the server launch.

RE: setup error for mysql using password - Added by John Z about 16 years ago

I don't know what is going on. I blew away that install to try again from a clean run. So I lost production.log from that try. I got things running on the first try on Windows using Instant Ruby. So, I'm going to back away from Ubuntu packages and try installing the whole stack from source. I'll report back later.

RE: setup error for mysql using password - Added by Prabhas Pokharel over 14 years ago

Ok, I was having the same problems. Another symptom I had was that my log/production.log was empty, and running

  ruby script/about

in the application root would give me
About your application's environment
Ruby version              1.8.7 (i686-linux)
RubyGems version          1.3.5
Rails version             2.1.2
Active Record version     2.1.2
Action Pack version       2.1.2
Active Resource version   2.1.2
Action Mailer version     2.1.2
Active Support version    2.1.2
Application root          /home/mactive/public_html/matador
Environment               development
Database adapter          mysql
Database schema version   101

Anyways, I figured it out. The install instructions said to run

  rake config/initializers/session_store.rb

The fix was to remove everything in the app folder, download redmine again, and this time around, run
  RAILS_ENV=production rake config/initializers/session_store.rb

instead of the former.

    (1-3/3)