Instant Rails mySQL Error

I have tried everything in my power to get this program up and running
and it is not working for me. I have installed RoR on my Windows XP
machine. I have Instant Rails and Ruby on Rails and I am using Instant
Rails to connect the mySQL database to Ruby on Rails. It is not
working.

Everything works fine except when I create a scaffold it gives me an
error in mySQL.
The error reads,

“> ruby script/generate scaffold Product Admin
exists app/controllers/
exists app/helpers/
exists app/views/admin
exists app/views/layout
exists test/functional/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
identical app/models/product.rb
identical test/unit/products.ywl
identical test/fixtures/product.yml
#28000Access denied for user ‘root’@‘localhost’ (using password: NO)”.

I have done this several time and continue to get the same error. Is
there anyone that can chat with me on an instant messenger or live
chat to help me with my problem, if possible.

On Sat, 2007-10-06 at 07:27 +0000, Mr. Watson wrote:

identical app/models/product.rb
identical test/unit/products.ywl
identical test/fixtures/product.yml
#28000Access denied for user ‘root’@‘localhost’ (using password: NO)".

I have done this several time and continue to get the same error. Is
there anyone that can chat with me on an instant messenger or live
chat to help me with my problem, if possible.

It seems that you have not specified mysql username and password
correctly edit your config/database.yml , set proper values for mysql
connection .

-Ajay M.

You didn’t specify root’s password, if this is ok try to login to mysql
console without password, does this allow you ?

My config/database.yml files shows,

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

It seems to be correct to me.

Try adding the port for mysql:

development:
adapter: mysql
database: depot_development
username: root
password:
host: localhost
port: 3306

That work? This fixed another windows users issue that was very similar.

hm strange …

Maybe you installed mysql separately from InstantRails ?

With InstantRails, you dont need install anything, everything is
bundled: ruby, ror, some gems, mysql, apache, phpmyadmin for mysql…
And mysql configured (default by Instant rails) to be set to root
without password. thats my way on windows.

Then u start instantrails, does mysql running normally ? (3306 port) ?

Also try to run apache and browse http://localhost/phpmyadmin and get
some access…

donate to Yulia http://www.yulia-site.org

mysql -u root

or

mysql -u root -p