遇到的问题

遇到的问题

我现在参照《Agile Web Development with Rails》在 cmd中输入入:...\depot>ruby script/generate scaffold Product Admin 时提示:#28000 Access denied for user 'root'@'localhost' <using password: NO>.无法进行下面的操作.我的环境是XP下面的MySQL Server 5.0  可不可以提供一个解决的方法 十分php?name=%B8%D0%D0%BB" onclick="tagshow(event)" class="t_tag">感谢
是SQL数据库设置的问题
打开你的
/depot/config/database.yml
找到development一栏:

[Copy to clipboard] [ - ]
它提示

rake aborted!
syntax errorn Line 17,col 2:'password:'
<see full trace by running task with --trace>
检查password这行是否有多作的空格什么的。
可不可以   再确切些
不是已经提示语法错误吗?
syntax errorn Line 17,col 2:'password:'

你就要去17行检查一下有没有什么错误,要不把你的 database.yml 发上来看看也行。
# MySQL (default setup). Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql
# On MacOS X:
# gem install mysql -- --include=/usr/local/lib
# 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
development:
 adapter: mysql
 database: depot_development
 username:root
 password:
 host: localhost

# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.
test:
 adapter: mysql
 database: depot_test
 username: root
 password:
 host: localhost

production:
 adapter: mysql
 database: depot_production
 username: root
 password:
 host: localhost
引用:
development:
 adapter: mysql
 database: depot_development
 username: root
 password:
 host: localhost

production:
 development

test:
 development
还是出现#28000 Access denied for user 'root'@'localhost' <using password: NO>.这个问题 是不是和mysql的版本有关???
你本地的MySql有密码吧。把密码填到password那栏看。