MySQL Problem

Joined
Mar 26, 2006
Messages
603
Reaction score
7
Im currently usin MySQL 5.2 Alpha, I was usin 5.0 got this same error so i tried 4.1.22 and that didnt work either, Im also usin appserv 2.5.1 and username1 php login script. Ive tried others and none work they get the same error. How do i fix this?

Code:
Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in c:\AppServ\www\includes\login.php on line 2
MySQL connection failure
 
This will tell you how to connect MySQL Server with the PHP mysql_connect Function

When you are ready to work with the MySQL database in your PHP programs, the first thing you must do is connect to (or identify yourself to) the MySQL server. Here is the PHP function you will use to open a connection to the MySQL server.

$connection =
mysql_connect("host", "username", "password");

Note--The arrow indicates that the code is wrapped to a second line and should really be all on one line.

This simple line of code is all you need to identify yourself, and your program, to the MySQL server. The variable $connection is the name I have given for this variable. Of course, you can use any name you prefer. You will want to replace the host name with the name that your hosting company instructs you to use here. Most of the time, it will be localhost. Check their online documentation or user's manual. You will also need to replace the username and password with the username and password given to you by your hosting company. You will probably find this in the welcome email sent to you when you opened your account.

If the server is not available for some reason, an error message such as the one below will be sent to the web browser.

Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in C:\sokkit\site\test.php3 on line 4
YOUR ERROR

You may not want your site visitors to see this technical error message. In that case, you can prevent the error message by placing an @ in front of the mysql_connect().

$connection =
@mysql_connect("host", "username", "password");

Note--The arrow indicates that the code is wrapped to a second line and should really be all on one line.

You may want to send a nice message to your site visitors telling them to try again later. You can use the die statement for this.

$connection =
@mysql_connect("host", "username", "password")
or die ("Could not connect to the database server
at this time. Please try later.");

Note--The arrow indicates that the code is wrapped to a second line and should really be all on one line.

If the MySQL server is unavailable, the text string you place between the quotation marks will be sent to the browser.

I hope this helps.
 
Check your c:\windows\php.ini file. There are some MySQL connection settings there, they're most likely FUBAR'd.

iNs@nE: that has to be the stupidest answer yet. Your reply even says what error you get if you can't connect - "Can't connect to MySQL server on 'localhost' (10061)" - which is clearly not lordvladeks error, so why do you copy-paste that entire text if its obviously not whats troubling him?! >_>
 
lol usin the newest one, and mysql is setup right, i mean maybe it isint runnin or somethin? should i see a icon of some sort that shows its runnin?

EDIT: Fixed :D Thanks for everyones help I think i got it now =]
 
run the mysql command client and imput this
Code:
SET PASSWORD FOR 'username'@'localhost' = OLD_PASSWORD('password');
Then that fixes it :D but hey fragfrog you think i could ask you like 2 php questions?
 
Check your c:\windows\php.ini file. There are some MySQL connection settings there, they're most likely FUBAR'd.

iNs@nE: that has to be the stupidest answer yet. Your reply even says what error you get if you can't connect - "Can't connect to MySQL server on 'localhost' (10061)" - which is clearly not lordvladeks error, so why do you copy-paste that entire text if its obviously not whats troubling him?! >_>

Sorry about that. I was pretty drunk last night and just copy pasted what came to my hand.

Thats the reason I included "Hope this helps"
 
Gah, being drunk is always a good excuse if you ask me :icon6:

lordvladek: truth be told, yes, I do mind. I'm bussy enough as it is without constantly having to help people with their PHP problems, besides, you learn a lot more if you simply search for the sollution yourself :wink: I never asked anyone anything and look where I am today :smile:
 
Good, you actually read the manual :smile:

lol... Im not like half the other people expecting people to do it for me.
@ FragFrog right after i posted that i figured it. All i really need now is to figure out how im goin to do personal profiles that you can edit, ect, fav games/whatever else. Got it done just gives me error sayin i didnt type anything in the box and cant figure out what ive done wrong.
 
Back