Announcement (2017-05-07): www.ruby-forum.com is now read-only since I
unfortunately do not have the time to support and maintain the forum any
more. Please see rubyonrails.org/community and ruby-lang.org/en/community
for other Rails- und Ruby-related community platforms.

I'm following the example Depot app in Agile Web Development 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.
I'm using MySql 5.0.19-nt and Rails 1.1.2.

Paul Barry wrote:
> 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.>> mysql> create database depot_development;> Query OK, 1 row affected (0.03 sec)>> mysql> grant all privileges on depot_development.* to> 'jimmy'@'localhost'> -> identified by 'letmein';> Query OK, 0 rows affected (0.03 sec)>> mysql> quit> Bye> pbarry@paul-barrys-mac-mini:~/projects $ rails depot> create> create app/controllers> create app/helpers> ...> pbarry@paul-barrys-mac-mini:~/projects $ cd depot> pbarry@paul-barrys-mac-mini:~/projects/depot $ cat config/database.yml |> ruby -e '$stdin.each {|line| puts line.sub(/username: root/,"username:> jimmy").sub(/password:/,"password: letmein") }' > config/database.yml> pbarry@paul-barrys-mac-mini:~/projects/depot $ rake db:migrate> (in /Users/pbarry/projects/depot)> pbarry@paul-barrys-mac-mini:~/projects/depot $>> 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.
Thanks for your help!