i created a db with one table "users" with one record, then run ruby
returns : "access denied for root@localhost"
why is that? i created the table and record inside mysql through the
same user and password in database.yml.
Check you password in database.yml. Also, make sure you actually have a root user in mysql.
Marcelo de Moraes Serpa wrote:
Check you password in database.yml. Also, make sure you actually have a
user in mysql.
On Tue, Jul 29, 2008 at 11:57 PM, Joey Boy
thank you. i'm 101% about the password, and i do have root account in
mysql. i actually created another account with same user as the db.
hoping rails was expecting that. but..apparently..i'm wrong..
Dude, it's already running.
You're specifying the wrong username or password, or that user does not have correct permissions to access the database.
Rails doesn’t expect anything, it only passes the user and password as you write them in database.yml.
So, if this user doesn’t exist in mysql, it won’t connect. If the password doesn’t match the correct one it won’t connect also (obviously), if the user doesn’t have the perms to read this database, it will return an not authorized message or something in the lines.
babu nair wrote:
The problem is its not getting mysql path with that use name &
password..Do onething while creating project use following instruction
rails project_name -d mysql
It will create database.yml file with mysql path...
that's what i did. i generate a new app and copied the database.yml file
over the problematic one. that fixed it.
thank you so much guys!