wordmystic
2011-Apr-03 02:14 UTC
error: ''Access denied for user ''root''@''localhost'' <using password: NO>''
rails railscoders --database=mysql created the directory with folders except for a ''components/'' folder which Practical Rails by Alan Bradburne lists as one of the folders created. Continuing with: mysqladmin -u root create railscoders_development returns this: mysqladmin: connect to server at ''localhost'' failed error: ''Access denied for user ''root''@''localhost'' <using password: NO>'' My database.yml file shows development: adapter: mysql encoding: utf8 database: railscoders_development username: root password: host: localhost along with same for test and production. And as I''m on windows these comments at the top of the yml file it that helps explain the error: # On Windows: # gem install mysql # Choose the win32 build. # Install MySQL and put its /bin directory on your path. # # And be sure to use new-style password hashing: # http://dev.mysql.com/doc/refman/5.0/en/old-client.html Any sugggestions? Bruce -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Dan Vig
2011-Apr-03 02:23 UTC
error: ''Access denied for user ''root''@''localhost'' <using password: NO>''
You left the password empty in your yml file but your local mysql you must have specified a password for root. So you need to plug that password in your password option in your yml file. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
kaushikxkcd
2011-Apr-03 06:53 UTC
Re: error: ''Access denied for user ''root''@''localhost'' <using password: NO>''
Hello Bruce, i think Dan is correct. Rails usually look out for database in some cases even if it doesnt have to. But if you havent set a password in MySQL while installing in the first case then you dont need to fill the password blank. Also, which MySQL are you using ? Now, if u have set a password then in that case you will have to login as "mysql -u root -p" It will ask u the password after you enter this command. Once you put the password it will not pop any such error. On Apr 3, 7:14 am, wordmystic <bwilson...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> rails railscoders --database=mysql > > created the directory with folders except for a ''components/'' folder > which Practical Rails by Alan Bradburne lists as one of the folders > created. > > Continuing with: > mysqladmin -u root create railscoders_development > > returns this: > > mysqladmin: connect to server at ''localhost'' failed > error: ''Access denied for user ''root''@''localhost'' <using password: > NO>'' > > My database.yml file shows > > development: > adapter: mysql > encoding: utf8 > database: railscoders_development > username: root > password: > host: localhost > > along with same for test and production. > > And as I''m on windows these comments at the top of the yml file it > that helps explain the error: > > # On Windows: > # gem install mysql > # Choose the win32 build. > # Install MySQL and put its /bin directory on your path. > # > # And be sure to use new-style password hashing: > # http://dev.mysql.com/doc/refman/5.0/en/old-client.html > > Any sugggestions? > > Bruce-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2011-Apr-03 09:51 UTC
Re: error: ''Access denied for user ''root''@''localhost'' <using password: NO>''
On 3 April 2011 03:14, wordmystic <bwilsonnow-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> rails railscoders --database=mysql > > created the directory with folders except for a ''components/'' folder > which Practical Rails by Alan Bradburne lists as one of the folders > created. > > Continuing with: > mysqladmin -u root create railscoders_development > > returns this: > > mysqladmin: connect to server at ''localhost'' failed > error: ''Access denied for user ''root''@''localhost'' <using password: > NO>''That is not a Rails issue, it is saying that you have not setup your mysql server to allow access as user root with no password. Assuming that you have setup a mysql server then provide a valid user and password in the mysqladmin command. Google for mysqladmin if you do not know how to do that.> > My database.yml file shows > > development: > adapter: mysql > encoding: utf8 > database: railscoders_development > username: root > password:Also setup appropriate user and password here. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.