MySQL

Hello,

I am having problems with MySQL.

Running: PC with Windows Vista
Installed: Instant Rails AND RoR on (http://www.rubyonrails.com)

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?

Hi,

Remove the space between the -p and root

ie mysqladmin -u root -proot

Simon

On Mon, 24 Nov 2008 15:27:07 +0900, Mr. Watson [email protected]

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’

On Mon, 24 Nov 2008 15:37:01 +0900, Mr. Watson [email protected]

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

the command “mysql -u root” worked for me.

Thanks,

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.

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

I did that and it worked. But I type in the “rake db:migrate” command
and it tells me " Access denied for user ‘[email protected]’ "

“Elementary, my dear Watson” :slight_smile:

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

http://hillemania.wordpress.com/2006/09/21/rails-mysql-50-on-windows-setup-problemfix-libmysqldll/

Also, Google is much better than Sherlock Holmes…

Cheers, Sazima

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?

On Nov 24, 11:13 am, “Hassan S.” [email protected]

On Mon, Nov 24, 2008 at 8:25 AM, Mr. Watson [email protected]
wrote:

I did that and it worked. But I type in the “rake db:migrate” command
and it tells me " Access denied for user ‘[email protected]’ "

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


Hassan S. ------------------------ [email protected]

On Mon, Nov 24, 2008 at 12:20 PM, Mr. Watson [email protected]
wrote:

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)

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?


Hassan S. ------------------------ [email protected]

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)”

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)

On Mon, Nov 24, 2008 at 12:37 PM, Mr. Watson [email protected]
wrote:

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

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


Hassan S. ------------------------ [email protected]

Database.yml file:

SQLite version 3.x

gem install sqlite3-ruby (not necessary on OS X Leopard)

development:
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.

test:
adapter: mysql
database: depot_test
username: root
password: root
host: localhost

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

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

On Nov 24, 2:35 pm, “Hassan S.” [email protected]

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

On Nov 24, 2:35 pm, “Hassan S.” [email protected]

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

It still doesn’t work typing “mysql -u root -proot”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs