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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

login to mysql 5.0 1

Status
Not open for further replies.

imarosel

Technical User
Jun 23, 2005
149
0
0
US
I am super super new to mysql. I just downloaded 5.0 on to my windows machine today. I don't know much about how mySQL knows who is using it from where ip address etc. I dont know anything about networking. Here is some behaviour I'm trying to decipher.

1. I go to the mysql command line prompt and it asks me for password. I type my password for root@localhost and everything is cool, but what if I don't want to login as root@localhost? How do I get prompted for user?

2. I go to the cmd prompt and type "mysql -h localhost -u root@localhost -p mypassword", this takes me to the password prompt I get in 1 above, but I type in my root@localhost password and the cmd prompt beeps and then shuts down. What is going on here?
 
A couple of things.

(1) The user should be given as "root", not "root@localhost". The "@localhost" bit is supplied by the address of the machine you're using. Also, "-h localhost" is optional; it's the default value.

(2) "-p mypassword" should have no intervening space; it should be "-pmypassword".

You might also like to know there are other user-friendlier ways to access a MySQL server. MySQL Administrator and MySQL Query Browser are GUI programs, available free at the MySQL website.
 
thanks I didn't know about the guis.

ok taking the @localhost and the space in the password works well, thanks.

I'll have more questions about creating new users, but I should probably google a few of those first, thanks.
 
Hi Imarosel.

I'm also new at MySQL so you will not get much advice from me. Just wanted to point you to a cool prog called MySQL-Front. From the litte I used MySQLAdmin I think it offers quite a bit more power. Problem is that it's not free.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top