473,398 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

mysql_connect failed in apache 5.0.22

Hello all,

I am running MYSQL 4.1.17, PHP 4.3.9 under apache 2.0.52 on solaris.
PHP seems to work fine, except that it can't connect to mysql
database. I got this error:

Warning: mysql_connect(): Client does not support authentication
protocol requested by server; consider upgrading MySQL client
But MYSQL 4.1.17 is the latest version, and PHP 4.3.9 is the latest 4
version. Should I try PHP 5.0.2 or downgrade apache?

Please help.

Allen Guan
Jul 17 '05 #1
6 4679
In article <88**************************@posting.google.com >, Allen Guan wrote:
Hello all,

I am running MYSQL 4.1.17, PHP 4.3.9 under apache 2.0.52 on solaris.
PHP seems to work fine, except that it can't connect to mysql
database. I got this error:

Warning: mysql_connect(): Client does not support authentication
protocol requested by server; consider upgrading MySQL client


You should use mysqli_connect

--
Met vriendelijke groeten,
Tim Van Wassenhove <http://www.timvw.info>
Jul 17 '05 #2
Allen Guan wrote:

Hello all,

I am running MYSQL 4.1.17, PHP 4.3.9 under apache 2.0.52 on solaris. ^^^^^^
That is the reason for the error.
Warning: mysql_connect(): Client does not support authentication
protocol requested by server; consider upgrading MySQL client
MySQL 4.x use a newer authentication, more secure authentication method
with longer passwords. Since PHP does not yet understand this method a
connect will always fail with that error message.
But MYSQL 4.1.17 is the latest version, and PHP 4.3.9 is the latest 4
version. Should I try PHP 5.0.2 or downgrade apache?


Neither is neccessary. You can tell MySQL to fall back to old style
authentication until PHP is upgraded to support the new method.

Shutdown the MySQL server, look for the MySQL config file (It's usually
called my.ini and can be found in the directory where you installed the
server. At least that's where I can find it in the Windows version.). In
the config file look for the "[mysqld]" section and write one line with
the content "old-passwords" (without the quotes of course) into the
file. Save the file and restart the server.

If you followed these instructions to the letter MySQL will now accept
calls from PHP again.

Bye!
Jul 17 '05 #3
Tim Van Wassenhove wrote:

In article <88**************************@posting.google.com >, Allen Guan wrote:
Hello all,

I am running MYSQL 4.1.17, PHP 4.3.9 under apache 2.0.52 on solaris.
PHP seems to work fine, except that it can't connect to mysql
database. I got this error:

Warning: mysql_connect(): Client does not support authentication
protocol requested by server; consider upgrading MySQL client


You should use mysqli_connect


There is no mysqli_connect() in PHP4.

Bye!
Jul 17 '05 #4
Anonymous wrote:

Correcting myself:
MySQL 4.x use a newer authentication, more secure authentication method


MySQL 4.1.x uses a newer, more secure authentication method...
Jul 17 '05 #5
Allen Guan wrote:
Warning: mysql_connect(): Client does not support authentication
protocol requested by server; consider upgrading MySQL client

But MYSQL 4.1.17 is the latest version, and PHP 4.3.9 is the latest 4
version. Should I try PHP 5.0.2 or downgrade apache?


Both PHP 4.3.9 and PHP 5.0.2 will have this problem because you're using
the old MySQL client libraries.

Either recompile PHP explicitly using the updated MySQL 4.1 client
libraries, or fiddle with MySQL to use the old, compatible
authentication scheme.

Please see: http://dev.mysql.com/doc/mysql/en/Old_client.html

-- brion vibber (brion @ pobox.com)
Jul 17 '05 #6
Brion Vibber <br***@pobox.com> wrote in message news:<30*************@uni-berlin.de>...
Allen Guan wrote:
Warning: mysql_connect(): Client does not support authentication
protocol requested by server; consider upgrading MySQL client

But MYSQL 4.1.17 is the latest version, and PHP 4.3.9 is the latest 4
version. Should I try PHP 5.0.2 or downgrade apache?


Both PHP 4.3.9 and PHP 5.0.2 will have this problem because you're using
the old MySQL client libraries.

Either recompile PHP explicitly using the updated MySQL 4.1 client
libraries, or fiddle with MySQL to use the old, compatible
authentication scheme.

Please see: http://dev.mysql.com/doc/mysql/en/Old_client.html

-- brion vibber (brion @ pobox.com)


Thanks a bunch. After I use "set password for 'user'@'localhost' =
OLD_PASSWORD(newpwd, it works.

Allen Guan
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: BT | last post by:
Hi .. a newbie question. I get the following error: Fatal error: Call to undefined function: mysql_connect() in /var/www/html/index.php on line 3. I have the following RPMS installed on RH7.2...
0
by: W i l l | last post by:
I have Apache 2 parsing and serving PHP files just fine on my winXP box, however, when I try to add some mysql database functionality I get a warning that looks like this: Fatal error: Call to...
0
by: Jon Drukman | last post by:
I've got a library of PHP code whose first line is a mysql_connect statement, like this: $dbh=mysql_connect() or die("mysql connect failed: $php_errmsg"); Approximately 1% of the time it just...
19
by: Michael | last post by:
Hi, I'm trying to do something which should be very simple - connect to the MySQL database. Here is the call, followed by the error msg. $conn = mysql_connect("localhost", "root", ""); ...
7
by: avenpace | last post by:
Hi, I got error when using mysql_connect function in my php script. If i set the db host to localhost, it give me that error altough all the user and password that I wrote is true(I can login...
6
by: GD | last post by:
Hi All, I've got MySQL 5.0.21 running on Windows Server 2003, and php running on Apache on a Linux box (Fedora Core 4). Previously when the pages were running on an IIS server the connection...
14
by: brett | last post by:
I'm running PHP5 on Windows Vista with mysql 5.2. I have a simple php file with <? $dbc = mysql_connect (); ?> When I run the file, I get this error: Fatal error: Call to undefined...
5
by: yoyoz | last post by:
Help!!!! i am newbie to php, i was trying to establish the connection to another machine (solaris) so that i can retrieve data from the database stored inside there using my own PC. for your...
14
by: farhan | last post by:
Hi, Please divert me if this is not the right group to be posting this question. I am a Linux client trying to connect to a mysql windows server via php, upon hitting the mysql_connect line...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.