I am having problems with MySQL.

Running: PC with Windows Vista
Installed: Instant Rails AND RoR on (

I have edited the database.yml file.

I went to C:/InstantRails/mysql/bin>mysqladmin -u root -p root

And it says "password:".

I press enter and it shoots this error.

" mysqladmin: Unknown command: 'root' "

Any ideas?


Remove the space between the -p and root

ie mysqladmin -u root -proot


Nothing. It just gives me the help list.

Are you trying to log into the mysql command line tool to do sql queries etc?

if so, then it isn't mysqladmin, it is just mysql
ie 'mysql -u root -proot'

if you are actually trying to do something with mysqladmin, you need to put that command on the command line,
ie 'mysqladmin -u root -proot ping'

the command "mysql -u root" worked for me.


It will let me go into mysql but I want to create a database. It is
not letting me. It says install gem mysql... I did that and got an
error. It reads "While generating documentation for mysql... MESSAGE:
Unhandled special: Special: type=17..." etc

I try the command "rake db:migrate" and it tells me it cannot find
libmysql.dll file.

You have to have your mysql bin directory in your PATH environment
variable. So if you installed mysql in c:\mysql then add c:\mysql\bin
to your path.

"Elementary, my dear Watson" :slight_smile:

Copy the dll to c:\windows or add it to your path.


Also, Google is much better than Sherlock Holmes...

Cheers, Sazima

I did that and it worked. But I type in the "rake db:migrate" command
and it tells me " Access denied for user 'root@localhost' "

You need to configure config/database.yml with the appropriate
access information (username, password, etc.) for your DB.

Everything is working correct. I can log into MySQL. Ruby on Rails is
up on running on the localhost. It created the database for me. But
every time I use the rake db:migrate command it gives me the error.

"rake aborted!
Access denied for user 'root'@'localhost' (using password: YES)

(See full trace by running task with --trace)

I ran it with trace and got the following message:
"** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!"

(And many system files afterwards)

Any ideas?

It is acting like it is working. For example, I typed in rake
db:migrate and it created the databse and the post.rb file. But it is
still showing the error: "Access denied for user
'root'@'localhost' (using password: YES)"

That's saying that the password for root in database.yml is wrong;
are you saying that it's not? You can log in *using the exact same
information* as you've got in database.yml?

Also, in SQL, I type "mysql -u root -p=password (as I configured the
database.yml file) and it gives me the same error.

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
password: YES)

That should be -ppassword -- no "=", and no space separating the -p
from the actual password.

Database.yml file:

# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
  adapter: mysql
  database: depot_development
  username: root
  password: root
  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.
  adapter: mysql
  database: depot_test
  username: root
  password: root
  host: localhost

  adapter: mysql
  database: depot_production
  username: root
  password: root
  host: localhost"

I am typing in mysql -u root -p=root

On the end, I put the " there. It is not in the yml file.

I can log in with mysql -u root but it still gives me an error when
using rake db:migrate

It still doesn't work typing "mysql -u root -proot"