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

Problems with SQL Host Name and Password

Status
Not open for further replies.

shift244

Programmer
Jan 5, 2004
6
MY
Hi all, maybe there's a similar problem out there, but I've been throught the first dozen pages and found no solution. I'm using the MySQL Control Center to create Servers and (when possible) the Databases. Here's the problem:


Question 1:
I've installed mySQL 4.0 into two machines, one running on Win2K and another running on WinXP-pro. The Win2K machine can create a server and connect to it with Host Name 127.0.0.1; but not with 'localhost' (I understand there seem to be some problem with (the keyword) 'localhost' without setting -standalone or something like that?) nor its assigned IP (say 191.166.1.199) in the LAN as Host Name.

Now, the WinXP-pro machine cannot connect to a server that it creates with Host Name 127.0.0.1 or 'localhost' or its asiigned IP in the LAN; but it can connect to the Win2k machine (at IP 191.166.1.199).

Both machines are in the same LAN. What is the problem?


Question 2:
Same situation, (with the problem 1 unsolved, of course), I've used Connect/J to write a simple program to create a new table and run it on both machines. The Win2k is running fine, but the WinXP-pro machine returns with an error regarding --Password: YES--. Do I need to provide a password? The Server and Database that I'm targeting has not password set.
 
i had a similar problem i think in that mysql was saying cannot connect to localhost using password:yes
Basically it didn't like the fact that I was supplying a password

e.g. mysql -uusrname -ppassword

however when i entered

mysql -uusrname -p

I received a prompt to enter my password...when i hit enter the machine went into mysql mode.

In my user table I have the values @ for the user and % for the host.
Are these wildcards or something, i think that is why mysql accepts any password

 
hmm... it seems that you were supplying a password when the mysql server was not set to have one, so the problem may be there, but i did not set a password when creating the server. or am i reading the post incorrectly?

oh.. and can anyone tell me what is ERROR 2003? i know it is a connection error, but i would like to know about the details etc? how do i see it? or get a list of the errors?
 
one cannot delete one's post it seems...

about the earlier posts, i've gone and checked the password portion, and noticed that i'd accidentally placed a space as the password, so it wasn't null all along :p Sorry and THX bhutz!

just to let others reading this post know, i've found a workaround to the problem (for winXP at least). I went to the mysqld.exe file and selected the "Run As..." option and unchecked the security option from "Run as [PCname]".

I can now connect using 127.0.0.1, 'localhost' and its assigned IP addess in the LAN, but only with port 3306.

This is not a good solution. Does anyone have something better than this? It is not a viable option to disable security options like this all the time to connect to mySQL. And why does other ports (other than 3306) not work?
 
could u explain what is this option < &quot;Run As...&quot;> in XP



[ponder]
----------------
ur feedback is a very welcome desire
 
by clicking the right mouse button on the icon, you will get a list of options. on earlier version of windows, it seems as far back as win2k, you might need to hold down &quot;Shift&quot; on your keyboard when clicking the right mouse button or the option might not show...
 
agrh!

i said i got it to work before? well, now it is not again. i checked the services running in Windows, and MySQL as listed as started, but i get the red traffic light. I went into properties for the MySQL service, and i get the option to start it. Click on the button, it stops after about 2 seconds. Something is stoping the service, so i can never get a connection. can anyone please help?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top