I’m following the example Depot app in Agile Web D. with Rails.
The scaffold fails because it is not using the correct host for the
user. Here is the error that the scaffold emits:
Access denied for user ‘jimmy’@’%’ to database ‘depot_development’
The MySql user ‘jimmy’ was created with the host of ‘localhost’, and the
database.yml file is using ‘localhost’ as the host for user ‘jimmy’ on
the depot_development database.
That looks pretty standard. I just tried it and it seems to work fine,
did
you do something different than this?
pbarry@paul-barrys-mac-mini:~/projects $ mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 4.1.18-standard
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
What happens when you run this from the command line?
mysql -D depot_development -u jimmy -pletmein
Do you get in?
Thanks!
When I log in at the command line I get an access denied error, however
I can log in fine with a GUI tool using the same credentials…strange.
When I granted privileges I did not use the IDENTIFIED BY parameter.
This is what was causing my problems. The MySql example did not inlcude
this parameter in their sample.
Once I re-issued the grant all privileges using your syntax…I was able
to log in at the command and create the scaffold just fine.
That looks pretty standard. I just tried it and it seems to work fine,
did
you do something different than this?
pbarry@paul-barrys-mac-mini:~/projects $ mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 4.1.18-standard
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.