Project

General

Profile

mysql access denied

Added by Karthick k over 13 years ago

Hi,
I encountering a weird issue. The changes in database.yml is not affecting the app. When I changed the username of the db user, it still connects using a different username.
My guess is it is using some other setting since the access is denied (got it from mysql log) and it is always trying to access using 'redmine' as user.

"Connect Access denied for user 'redmine'@'localhost' (using password: YES)"

Any clue from where it is picking this username?

Thanks a lot.


Replies (6)

RE: mysql access denied - Added by Felix Schäfer over 13 years ago

Make sure you change the settings in the right environment and that you restart redmine after having made the change. Where did you get your redmine from, where is the file you are trying to edit, and so on?

RE: mysql access denied - Added by Karthick k over 13 years ago

I am trying to edit the redmine/config/database.yml > "production:"

I installed using apt-get (ubuntu installation guide).
I was not restarting.
How do i restart redmine? After quick search, i figured but tmp/restart.txt is not present.

Thanks.

RE: mysql access denied - Added by Karthick k over 13 years ago

I restarted Apache.
I get this error. ##################
Ruby on Rails application could not be started
Error message:
Access denied for user 'redmine'@'localhost' (using password: YES) (Mysql::Error)
Exception class:
Mysql::Error
Application root:
/usr/share/redmine
BackTrace:
0 /usr/lib/ruby/1.8/active_record/connection_adapters/mysql_adapter.rb 589 in `real_connect'
1 /usr/lib/ruby/1.8/active_record/connection_adapters/mysql_adapter.rb 589 in `connect'
2 /usr/lib/ruby/1.8/active_record/connection_adapters/mysql_adapter.rb 203 in `initialize'
3 /usr/lib/ruby/1.8/active_record/connection_adapters/mysql_adapter.rb 75 in `new'
4 /usr/lib/ruby/1.8/active_record/connection_adapters/mysql_adapter.rb 75 in `mysql_connection'
5 /usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb 223 in `send'
6 /usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb 223 in `new_connection'
7 /usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb 245 in `checkout_new_connection'
8 /usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb 188 in `checkout'
9 /usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb 184 in `loop'
10 /usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb 184 in `checkout'
11 /usr/lib/ruby/1.8/monitor.rb 242 in `synchronize'
12 /usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb 183 in `checkout'
etc.. ###################################################

RE: mysql access denied - Added by Felix Schäfer over 13 years ago

Karthick k wrote:

I am trying to edit the redmine/config/database.yml > "production:"

I installed using apt-get (ubuntu installation guide).

The debian package puts the config to /etc/redmine/ or something like that.

I was not restarting.
How do i restart redmine? After quick search, i figured but tmp/restart.txt is not present.

If you are serving redmine with passenger, touch tmp/restart.txt in your redmine directory will cause passenger to reload redmine on the next request.

RE: mysql access denied - Added by Karthick k over 13 years ago

I am on Ubuntu 10.10, Apache 2, MySql 5.1, Passenger.
Thanks.

RE: mysql access denied - Added by Karthick k over 13 years ago

Felix Schäfer wrote:

Karthick k wrote:

I am trying to edit the redmine/config/database.yml > "production:"

I installed using apt-get (ubuntu installation guide).

The debian package puts the config to /etc/redmine/ or something like that.

I was not restarting.
How do i restart redmine? After quick search, i figured but tmp/restart.txt is not present.

If you are serving redmine with passenger, touch tmp/restart.txt in your redmine directory will cause passenger to reload redmine on the next request.

The db.yml was in etc/redmine and that was the issue.
Thanks a million.

    (1-6/6)