Subject: Connecting to Mysql as admin
Posted By: najib Post Date: 11/18/2003 1:22:20 PM

I have completed  MySQL installation on my windows machine .I can navigate to C:\mysql\bin  directory .When I use " >mysqladmin -uroot password abcdef " ,to set up admin user name and password this error is shown:
mysqladmin: connecting to server at'localhost' faild
error: access denied for user: 'root@localhost' (Using password: NO)'

But I can connect to the data base by usinig  only username and not any password .And the result is that I can not USE the mysql data base ,however I can use the test database.

Note that I am the administrater of this machine and both the server and the client are installed on my machine.

Thanks in advance.



Reply By: nikolai Reply Date: 11/18/2003 10:09:44 PM
You're not sending your password properly.  The syntax for the mysqladmin command is:

mysqladmin [options] commands

Options begin with a - sign, so in your example, "password" and "abcdef" are interpreted as commands.

Type "mysqladmin" by itself on the commandline to get a list of options.  You should see that you need either -p or --password= to specify a password on the commandline.

A note about security, though:  If you're on a shared system, NEVER NEVER NEVER NEVER run an application by entering your password on the commandline.  Any user that can view a process list will see your password as one of the options passed to the application you're running.  This is easier to do on a linux/unix server than Windows, but you should be aware of it.



Take care,

Nik
http://www.bigaction.org/

Go to topic 6594

Return to index page 1002
Return to index page 1001
Return to index page 1000
Return to index page 999
Return to index page 998
Return to index page 997
Return to index page 996
Return to index page 995
Return to index page 994
Return to index page 993