MySQL


#1

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?


#2

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 removed_email_address@domain.invalid


#3

Nothing. It just gives me the help list.


#4

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 removed_email_address@domain.invalid


#5

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


#6

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

Thanks,


#7

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.


#8

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


#9

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’ "


#10

“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


#11

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.” removed_email_address@domain.invalid


#12

On Mon, Nov 24, 2008 at 8:25 AM, Mr. Watson removed_email_address@domain.invalid
wrote:

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.


Hassan S. ------------------------ removed_email_address@domain.invalid


#13

On Mon, Nov 24, 2008 at 12:20 PM, Mr. Watson removed_email_address@domain.invalid
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. ------------------------ removed_email_address@domain.invalid


#14

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


#15

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)


#16

On Mon, Nov 24, 2008 at 12:37 PM, Mr. Watson removed_email_address@domain.invalid
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. ------------------------ removed_email_address@domain.invalid


#17

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.” removed_email_address@domain.invalid


#18

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.” removed_email_address@domain.invalid


#19

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


#20

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