I got a strange problem.
I run a test-webserver and a MySQL server on the same machine. The code to
connect to the database is:
$db_link = mysql_connect (sql2.dahl-stamnes.net,stmbk,);
This gives me the error:
Warning: mysql_connect(): Client does not support authentication protocol
/doc/refman/4.1/en/old-client.html
- Original Message -
From: Jørn Dahl-Stamnes [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Friday, June 23, 2006 9:21 AM
Subject: PHP mysql_connect
I got a strange problem.
I run a test-webserver and a MySQL server on the same machine. The code
On Friday 23 June 2006 15:30, Brent Baisley wrote:
I assume you are using php. It has to do with how the password in mysql is
encrypted. On some accounts, the ones that work, it's encrypted in the
old way that php can use. The default new, php 4 can't use. Here's the
part of the manual that
At 15:47 +0200 23/6/06, Jørn Dahl-Stamnes wrote:
Yes, I forgot to say that I was using PHP...
Oh, I think the clue was in the subject line. :-)
--
Cheers... Chris
Highway 57 Web Development -- http://highway57.co.uk/
Revolution: an abrupt change in the form of misgovernment.
-- Ambrose
Am Freitag, 23. Juni 2006 16:27 schrieb Chris Sansom:
At 15:47 +0200 23/6/06, Jørn Dahl-Stamnes wrote:
Yes, I forgot to say that I was using PHP...
Oh, I think the clue was in the subject line. :-)
ever tried localhost as hostname?
--
Jochen Kaechelin, fvgi242ss, wlanhacking.de
On 6/23/06, Jørn Dahl-Stamnes [EMAIL PROTECTED] wrote:
On Friday 23 June 2006 15:30, Brent Baisley wrote:
I assume you are using php. It has to do with how the password in mysql is
encrypted. On some accounts, the ones that work, it's encrypted in the
old way that php can use. The default
On Mar 18, 2005, at 4:16 AM, Daniel Hawker wrote:
Curiouser and curiouser said Alice...
When you say *it seems to be the first connect* do you mean in a page,
ie the first connect/disconnect takes ages but then any subsequent
connects are fine)
Exactly. If I use pconnect the first one takes on
Restating apache resets the issue i.e. the next pconnects takes 5
seconds. Quitting the browser has no effect. I am currently testing
now to see if there is a time out issue i.e. if I wait 5 minutes will
the delay reappear?
FWIW, this sounds like a slow-to-respond DNS resolver. Are Apache
Thanks Jeremy!
It was the lack of a reverse DNS entry. I had the host resolved to an
IP but now reverse arpa entry. I added the DNS PTR record and viola!
I would have never though of / figured that one out.
Dan T
On Mar 18, 2005, at 10:59 AM, Jeremy Cole wrote:
Restating apache resets the
Hi Dan,
It was the lack of a reverse DNS entry. I had the host resolved to an
IP but now reverse arpa entry. I added the DNS PTR record and viola!
Excellent.
Also FWIW, you're not gaining anything by disconnecting after each query
in your PHP code. Connect once at the beginning of the script,
I'm not sure if it's a OS X, PHP or MySQL issue so I apologize in
advance if this is taken as too off topic.
I have a PHP5.x site under development with MySQL 4.1.10. I had the
site running fine and there were no speed issues at all. Everything is
on the same system (a dual G5 Xserve).
On Thu, 21 Aug 2003 18:18:37 -0700
Jon Drukman [EMAIL PROTECTED] wrote:
that is true, but in this case, neither $php_errmsg nor mysql_error()
return anything. i print them both out when the connect fails and they
are both just blank.
try to use error_reporting(E_ALL); and to see what
Antony Dovgal wrote:
try to use error_reporting(E_ALL); and to see what happends.
maybe error logging will help you to solve your trouble.
I don't beleive in such bugs, it's a problem of your code imho.
here's my code:
mysql_connect() or die(mysql connect failed: $php_errmsg / .
mysql_error());
Jon Drukman unknowingly asked us:
Antony Dovgal wrote:
try to use error_reporting(E_ALL); and to see what happends.
maybe error logging will help you to solve your trouble.
I don't beleive in such bugs, it's a problem of your code imho.
here's my code:
mysql_connect() or die(mysql connect
Antony Dovgal wrote:
On Tue, 19 Aug 2003 14:36:15 -0700
Jon Drukman [EMAIL PROTECTED] wrote:
Approximately 1% of the time it just fails, for no stated reason:
Warning: mysql_connect() [http://www.php.net/function.mysql-connect]:
in /var/httpd/htdocs/pi/pi.php on line 3
mysql connect failed:
On Wed, 20 Aug 2003 21:31:48 -0700
Jon Drukman [EMAIL PROTECTED] wrote:
mysql_error is not set when mysql_connect fails, because there is no
actual mysql resource to get the error message from.
yes, there is no mysql resource at this moment.
just don't specify it and mysql_error() will tell
If you reach to maximum mysql connection limit or link limit, mysql_connect will fail.
Check limits and current fullness.
---Original Message---
From: Jon Drukman
Date: 21 Austos 2003 Perembe 11:32:47
To: [EMAIL PROTECTED]
Subject: Re: PHP mysql_connect randomly failing
Antony
Antony Dovgal wrote:
mysql_error is not set when mysql_connect fails, because there is no
actual mysql resource to get the error message from.
yes, there is no mysql resource at this moment.
just don't specify it and mysql_error() will tell something like Can't connect to local
MySQL server
funny i was just having the same problemo with mysql 3.22 on php3 the most painful
system to debug i hate it to bits, anyway mysql_error doesnt get returned on
permission or database connection errors, i wonder if that is soughted out in mysql4
?? maybe this is a php.net question
Jon Drukman
On Tue, 19 Aug 2003 14:36:15 -0700
Jon Drukman [EMAIL PROTECTED] wrote:
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 fails, for no stated
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 fails, for no stated reason:
Warning: mysql_connect() [http://www.php.net/function.mysql-connect]:
in
Are you connecting through a TCP or a UNIX domain socket?
--Michael
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jon Drukman
Sent: Tuesday, August 19, 2003 2:36 PM
To: [EMAIL PROTECTED]
Subject: PHP mysql_connect randomly failing
I've got a library
unix domain.
Michael S. Fischer wrote:
Are you connecting through a TCP or a UNIX domain socket?
--Michael
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jon Drukman
Sent: Tuesday, August 19, 2003 2:36 PM
To: [EMAIL PROTECTED]
Subject: PHP mysql_connect randomly
23 matches
Mail list logo