Hai
2012-Jul-06 21:08 UTC
[Puppet Users] Access denied for user ''dashboard''@''localhost'' to database ''dashboard_production''
followed the instruction for installing dashboard, and created user mysql -pmy_password -e "CREATE DATABASE dashboard CHARACTER SET utf8;CREATE USER ''dashboard''@''localhost'' IDENTIFIED BY ''my_password''; GRANT ALL PRIVILEGES ON dashboard.* TO ''dashboard''@''localhost'';" however, I keep getting access denied error: # rake RAILS_ENV=production db:migrate (in /usr/share/puppet-dashboard) rake aborted! Access denied for user ''dashboard''@''localhost'' to database ''dashboard_production'' (See full trace by running task with --trace) please help! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/l7SmiRrFLFoJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Peter Bukowinski
2012-Jul-06 21:15 UTC
Re: [Puppet Users] Access denied for user ''dashboard''@''localhost'' to database ''dashboard_production''
On Jul 6, 2012, at 5:08 PM, Hai wrote:> followed the instruction for installing dashboard, and created user > > mysql -pmy_password -e "CREATE DATABASE dashboard CHARACTER SET utf8;CREATE USER ''dashboard''@''localhost'' IDENTIFIED BY ''my_password''; GRANT ALL PRIVILEGES ON dashboard.* TO ''dashboard''@''localhost'';" > > however, I keep getting access denied error: > > # rake RAILS_ENV=production db:migrate > (in /usr/share/puppet-dashboard) > rake aborted! > Access denied for user ''dashboard''@''localhost'' to database ''dashboard_production'' > > (See full trace by running task with --trace) > > > please help!Your created a database ''dashboard''. Make sure to put that name into the ''production:'' section of your [dashboad_root]/config/database.yml file. -- Peter Bukowinski -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
DJames
2013-Jun-26 12:58 UTC
[Puppet Users] Re: Access denied for user ''dashboard''@''localhost'' to database ''dashboard_production''
Make sure you are able to see the schema. Do a mysql> show tables; if you dont see the DB, then you need to make the DB. On Friday, July 6, 2012 5:08:53 PM UTC-4, Hai wrote:> > followed the instruction for installing dashboard, and created user > > mysql -pmy_password -e "CREATE DATABASE dashboard CHARACTER SET > utf8;CREATE USER ''dashboard''@''localhost'' IDENTIFIED BY ''my_password''; GRANT > ALL PRIVILEGES ON dashboard.* TO ''dashboard''@''localhost'';" > > however, I keep getting access denied error: > > # rake RAILS_ENV=production db:migrate > (in /usr/share/puppet-dashboard) > rake aborted! > Access denied for user ''dashboard''@''localhost'' to database > ''dashboard_production'' > > (See full trace by running task with --trace) > > > please help! >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Stefan Lasiewski
2013-Aug-09 23:43 UTC
[Puppet Users] Re: Access denied for user ''dashboard''@''localhost'' to database ''dashboard_production''
This is an old post, but I''ll respond anyways for posterity. My summer intern just ran into this problem. @pmbuko has the correct solution-- create a database named ''dashboard'' and make sure that database.yml says ''dashboard'' and not something else like ''dashboard_production''. I''ll explain why this error happened. This is a common mistake with Ruby-based software. If you follow the instructions http://docs.puppetlabs.com/dashboard/manual/1.2/bootstrapping.html , it''s easy to see why. The instructions at say to create a database named ''dashboard'': CREATE DATABASE dashboard CHARACTER SET utf8; CREATE USER ''dashboard''@''localhost'' IDENTIFIED BY ''my_password''; GRANT ALL PRIVILEGES ON dashboard.* TO ''dashboard''@''localhost''; However, the file `config/database.yml.example` says the database is named ''dashboard_production'': production: database: dashboard_production username: dashboard password: encoding: utf8 adapter: mysql If you copy config/database.yml.example to config/database.yml verbatim, then the command `rake RAILS_ENV=production db:migrate` will fail because it''s expecting to find a database named ''dashboard_production''. The simplest fix is to create a database named ''dashboard'' and update database.yml to use that name. A longer, but possibly more correct, solution would be to create three databases following the Ruby naming convention (dashboard_production , dashboard_development & dashboard_test) and grant privileges on all three databases. But that is probably more work then necessary for most people, and I suspect that most folks just use a single database named ''dashboard''. -= Stefan On Friday, July 6, 2012 2:08:53 PM UTC-7, Hai wrote:> > followed the instruction for installing dashboard, and created user > > mysql -pmy_password -e "CREATE DATABASE dashboard CHARACTER SET > utf8;CREATE USER ''dashboard''@''localhost'' IDENTIFIED BY ''my_password''; GRANT > ALL PRIVILEGES ON dashboard.* TO ''dashboard''@''localhost'';" > > however, I keep getting access denied error: > > # rake RAILS_ENV=production db:migrate > (in /usr/share/puppet-dashboard) > rake aborted! > Access denied for user ''dashboard''@''localhost'' to database > ''dashboard_production'' > > (See full trace by running task with --trace) > > > please help! >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.