Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot log on via command prompt.

Status
Not open for further replies.

mike777

Programmer
Jun 3, 2000
387
US
Hello folks.

I am new to MySQL (as you will soon see, no doubt!!). New, as in, like, 2 days new. Can't even hold my eyes straight yet (if you're a parent, you might get that).

Our entertainment division uses MySQL as the database of choice for their various websites. They are not command-line-type people (who would want to that? i mean I like command line OK, but I'm weird). Using their PHP Admin program, they administer the databases quite efficiently.

All of us can log on fine via the PHP interface. Additionally, I've installed the MySQL ODBC in a few places and it works fine. We all use the username root and password abc. No problems.

My problem is that I can't access the MySQL server via the command prompt.

I do this:
Code:
c:\mysql\bin\mysql -u root -p
then I get
Code:
Enter password:
at which time I type
Code:
abc
at which time I then get:
Code:
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES).


Is the "@localhost" part the problem? It looks like it's adding that to the user name and so the name root@localhost is what's being authenticated instead of just root. Just a guess. If so, how do I fix it?

Many thanks.

-Mike Kemp
 
Is the MySQL server located on the machine you're using? If not, then you need to add "-h host" to the command line, where host is the server's hostname or IP address.
 
Yes, it is on the same machine.
Thanks.
Question: Mr. Brooks' suggestion to execute the mysqladmin reload command: There is no chance that by issuing that command that any data will be lost or that a production server will become unavailable is there?
Thanks again.
-Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top