Problem connecting

Problem connecting

am 17.05.2006 04:19:06 von Hector

Hello everybody!

I have a problem, I wrote a program in perl and I can't connect to the
database, then I try connecting via mysql command and it works fine...

Here is the script.

$db=3D"planos";
$host=3D"localhost";
$userid=3D"web";
$passwd=3D"secret";
$connectionInfo=3D"dbi:mysql:$db;$host";
$dbh =3D DBI->connect($connectionInfo,$userid,$passwd) or die print =
"Error
connecting\n\n\n";

And I get=20

DBI connect('planos;localhost','web',...) failed: Access denied for user
'web'@'localhost' (using password: YES) at ./planos.pl line 25

I use:

mysql -u web -h localhost -p planos
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 38 to server version: 4.1.10a-Max-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

and I get in ok! Any ideas?

TIA

H=E9ctor S. Mendoza Ortiz


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

RE: Problem connecting

am 17.05.2006 15:22:28 von Hung Tran

H=E9ctor,

If you are using Windows you should have MySQL ODBC driver installed . =



Here is an example that use for via connection.

my $dbh =3D DBI->connect("dbi:mysql:host=3Dyourhostname:yourdatabase",
"yourusername", "yourpassword )
or die "Can't connect to MySQL database: $DBI::errstr\n";

$sth =3D $dbh->prepare("INSERT INTO yourdatabase
(col1,col2,col3)
VALUES ('$a','$b','$c')");
$sth->execute();


Regards,
Hung Tran

-----Original Message-----
From: H=E9ctor S. Mendoza O. [mailto:hector@acorporativa.com.mx]
Sent: Tuesday, May 16, 2006 10:19 PM
To: perl@lists.mysql.com
Subject: Problem connecting


Hello everybody!

I have a problem, I wrote a program in perl and I can't connect to the
database, then I try connecting via mysql command and it works fine...

Here is the script.

$db=3D"planos";
$host=3D"localhost";
$userid=3D"web";
$passwd=3D"secret";
$connectionInfo=3D"dbi:mysql:$db;$host";
$dbh =3D DBI->connect($connectionInfo,$userid,$passwd) or die print =
"Error
connecting\n\n\n";

And I get=20

DBI connect('planos;localhost','web',...) failed: Access denied for =
user
'web'@'localhost' (using password: YES) at ./planos.pl line 25

I use:

mysql -u web -h localhost -p planos
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 38 to server version: 4.1.10a-Max-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

and I get in ok! Any ideas?

TIA

H=E9ctor S. Mendoza Ortiz


--=20
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dhtran@btu.com


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

RE: Problem connecting

am 17.05.2006 16:02:18 von Hector

Hello all,=20

Sorry I forgot to mention, I'm using the program in Linux, perl is =
v5.8.3
and MySQL is 4.1.10a.

The script was working perfectly until I installed a php application =
that
required old_password set to 1 and an account with old password, =
thinking it
would not affect anything, I switched to old_password and changed =
passwords
for old_password, the new app worked fine and 5 min later I received a =
call
that the rest of the apps where not working, I switched back to
old_password=3D0 switched again old_passwords to new passwords and still =
not
working.

Any ideas?

TIA

H=E9ctor S. Mendoza Ortiz


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: Problem connecting

am 17.05.2006 19:16:13 von Patrick Galbraith

Héctor S. Mendoza O. wrote:

>Hello all,
>
>Sorry I forgot to mention, I'm using the program in Linux, perl is v5.8.3
>and MySQL is 4.1.10a.
>
>The script was working perfectly until I installed a php application that
>required old_password set to 1 and an account with old password, thinking it
>would not affect anything, I switched to old_password and changed passwords
>for old_password, the new app worked fine and 5 min later I received a call
>that the rest of the apps where not working, I switched back to
>old_password=0 switched again old_passwords to new passwords and still not
>working.
>
>Any ideas?
>
>TIA
>
>Héctor S. Mendoza Ortiz
>
>
>
>
Hector,

What does the error log say?

regards,

Patrick

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

RE: Problem connecting

am 17.05.2006 19:31:29 von Hector

Here is the log from the web server...


[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] DBI
connect('planos;localhost','web',...) failed: Access denied for user
'web'@'localhost' (using password: YES) at
/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/planos. pl line 25
[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] 1 at
/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/planos. pl line 25.

Here is the log if I run it from the shell

[root@chihuahua cgi-bin]# ./planos.pl
Content-type: text/html



Planos Centro Comercial El Paseo Tehuacan




DBI connect('planos;localhost','web',...) failed: Access denied for user
'web'@'localhost' (using password: YES) at ./planos.pl line 25
Error al conectarse con la base de datos


1 at ./planos.pl line 25.
[root@chihuahua cgi-bin]#

Here is if I run it from mysql

[root@chihuahua cgi-bin]# mysql -u web -h localhost -p planos
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 92 to server version: 4.1.10a-Max-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> quit
Bye
[root@chihuahua cgi-bin]#

Thanks in advance!

H=E9ctor S. Mendoza Ortiz


-----Mensaje original-----
De: Patrick Galbraith [mailto:patg@mysql.com]=20
Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 12:16 p.m.
Para: "H=E9ctor S. Mendoza O."
CC: perl@lists.mysql.com
Asunto: Re: Problem connecting

H=E9ctor S. Mendoza O. wrote:

>Hello all,=20
>
>Sorry I forgot to mention, I'm using the program in Linux, perl is =
v5.8.3
>and MySQL is 4.1.10a.
>
>The script was working perfectly until I installed a php application =
that
>required old_password set to 1 and an account with old password, =
thinking
it
>would not affect anything, I switched to old_password and changed =
passwords
>for old_password, the new app worked fine and 5 min later I received a
call
>that the rest of the apps where not working, I switched back to
>old_password=3D0 switched again old_passwords to new passwords and =
still not
>working.
>
>Any ideas?
>
>TIA
>
>H=E9ctor S. Mendoza Ortiz
>
>
> =20
>
Hector,

What does the error log say?

regards,

Patrick



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: Problem connecting

am 17.05.2006 19:35:34 von Patrick Galbraith

Héctor S. Mendoza O. wrote:

Hector,

What I mean, is the database error log.

Thanks!

Patrick

>Here is the log from the web server...
>
>
>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] DBI
>connect('planos;localhost','web',...) failed: Access denied for user
>'web'@'localhost' (using password: YES) at
>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/planos .pl line 25
>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] 1 at
>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/planos .pl line 25.
>
>Here is the log if I run it from the shell
>
>[root@chihuahua cgi-bin]# ./planos.pl
>Content-type: text/html
>
>
>
>Planos Centro Comercial El Paseo Tehuacan
>
>
>
>
>DBI connect('planos;localhost','web',...) failed: Access denied for user
>'web'@'localhost' (using password: YES) at ./planos.pl line 25
>Error al conectarse con la base de datos
>
>
>1 at ./planos.pl line 25.
>[root@chihuahua cgi-bin]#
>
>Here is if I run it from mysql
>
>[root@chihuahua cgi-bin]# mysql -u web -h localhost -p planos
>Enter password:
>Welcome to the MySQL monitor. Commands end with ; or \g.
>Your MySQL connection id is 92 to server version: 4.1.10a-Max-log
>
>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
>mysql> quit
>Bye
>[root@chihuahua cgi-bin]#
>
>Thanks in advance!
>
>Héctor S. Mendoza Ortiz
>
>
>-----Mensaje original-----
>De: Patrick Galbraith [mailto:patg@mysql.com]
>Enviado el: Miércoles, 17 de Mayo de 2006 12:16 p.m.
>Para: "Héctor S. Mendoza O."
>CC: perl@lists.mysql.com
>Asunto: Re: Problem connecting
>
>Héctor S. Mendoza O. wrote:
>
>
>
>>Hello all,
>>
>>Sorry I forgot to mention, I'm using the program in Linux, perl is v5.8.3
>>and MySQL is 4.1.10a.
>>
>>The script was working perfectly until I installed a php application that
>>required old_password set to 1 and an account with old password, thinking
>>
>>
>it
>
>
>>would not affect anything, I switched to old_password and changed passwords
>>for old_password, the new app worked fine and 5 min later I received a
>>
>>
>call
>
>
>>that the rest of the apps where not working, I switched back to
>>old_password=0 switched again old_passwords to new passwords and still not
>>working.
>>
>>Any ideas?
>>
>>TIA
>>
>>Héctor S. Mendoza Ortiz
>>
>>
>>
>>
>>
>>
>Hector,
>
>What does the error log say?
>
>regards,
>
>Patrick
>
>
>
>
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

RE: Problem connecting

am 17.05.2006 19:43:13 von Hector

Here is the the contents of the mysql log for the past 12 hours

060516 20:52:23 mysqld started
060516 20:52:24 InnoDB: Started; log sequence number 0 50644802
/usr/sbin/mysqld-max: ready for connections.
Version: '4.1.10a-Max-log' socket: '/var/lib/mysql/mysql.sock' port: =
3306
MySQL Community Edition - Max (GPL)
060517 12:42:11 [Note] /usr/sbin/mysqld-max: Normal shutdown

060517 12:42:11 InnoDB: Starting shutdown...
060517 12:42:12 InnoDB: Shutdown completed; log sequence number 0 =
50644839
060517 12:42:12 [Note] /usr/sbin/mysqld-max: Shutdown complete

060517 12:42:12 mysqld ended

060517 12:42:13 mysqld started
060517 12:42:14 InnoDB: Started; log sequence number 0 50644839
/usr/sbin/mysqld-max: ready for connections.
Version: '4.1.10a-Max-log' socket: '/var/lib/mysql/mysql.sock' port: =
3306
MySQL Community Edition - Max (GPL)

H=E9ctor S. Mendoza Ortiz

-----Mensaje original-----
De: Patrick Galbraith [mailto:patg@mysql.com]=20
Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 12:36 p.m.
Para: "H=E9ctor S. Mendoza O."
CC: perl@lists.mysql.com
Asunto: Re: Problem connecting

H=E9ctor S. Mendoza O. wrote:

Hector,

What I mean, is the database error log.

Thanks!

Patrick

>Here is the log from the web server...
>
>
>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] DBI
>connect('planos;localhost','web',...) failed: Access denied for user
>'web'@'localhost' (using password: YES) at
>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/planos .pl line 25
>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] 1 at
>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/planos .pl line 25.
>
>Here is the log if I run it from the shell
>
>[root@chihuahua cgi-bin]# ./planos.pl
>Content-type: text/html
>
>
>
>Planos Centro Comercial El Paseo Tehuacan
>
>
>
>
>DBI connect('planos;localhost','web',...) failed: Access denied for =
user
>'web'@'localhost' (using password: YES) at ./planos.pl line 25
>Error al conectarse con la base de datos
>
>
>1 at ./planos.pl line 25.
>[root@chihuahua cgi-bin]#
>
>Here is if I run it from mysql
>
>[root@chihuahua cgi-bin]# mysql -u web -h localhost -p planos
>Enter password:
>Welcome to the MySQL monitor. Commands end with ; or \g.
>Your MySQL connection id is 92 to server version: 4.1.10a-Max-log
>
>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
>mysql> quit
>Bye
>[root@chihuahua cgi-bin]#
>
>Thanks in advance!
>
>H=E9ctor S. Mendoza Ortiz
>
>
>-----Mensaje original-----
>De: Patrick Galbraith [mailto:patg@mysql.com]=20
>Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 12:16 p.m.
>Para: "H=E9ctor S. Mendoza O."
>CC: perl@lists.mysql.com
>Asunto: Re: Problem connecting
>
>H=E9ctor S. Mendoza O. wrote:
>
> =20
>
>>Hello all,=20
>>
>>Sorry I forgot to mention, I'm using the program in Linux, perl is =
v5.8.3
>>and MySQL is 4.1.10a.
>>
>>The script was working perfectly until I installed a php application =
that
>>required old_password set to 1 and an account with old password, =
thinking
>> =20
>>
>it
> =20
>
>>would not affect anything, I switched to old_password and changed
passwords
>>for old_password, the new app worked fine and 5 min later I received =
a
>> =20
>>
>call
> =20
>
>>that the rest of the apps where not working, I switched back to
>>old_password=3D0 switched again old_passwords to new passwords and =
still not
>>working.
>>
>>Any ideas?
>>
>>TIA
>>
>>H=E9ctor S. Mendoza Ortiz
>>
>>
>>=20
>>
>> =20
>>
>Hector,
>
>What does the error log say?
>
>regards,
>
>Patrick
>
>
>
> =20
>




--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

RE: Problem connecting

am 17.05.2006 20:01:18 von Hector

Here is another log file running mysql with --log=3D/tmp/connections.log

[root@chihuahua root]# cat /tmp/connections.log
/usr/sbin/mysqld-max, Version: 4.1.10a-Max-log. started with:
Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
Time Id Command Argument
060517 12:59:08 1 Connect Access denied for user =
'web'@'localhost'
(using password: YES)
060517 12:59:22 2 Connect web@localhost on planos
060517 12:59:23 2 Quit
[root@chihuahua root]#

Connection 1 is from the script, connection 2 is from the 'mysql -u web =
-h
localhost -p planos'

I already double checked passwords and I'm typing in both the same =
password

TIA

H=E9ctor S. Mendoza Ortiz

-----Mensaje original-----
De: Patrick Galbraith [mailto:patg@mysql.com]=20
Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 12:36 p.m.
Para: "H=E9ctor S. Mendoza O."
CC: perl@lists.mysql.com
Asunto: Re: Problem connecting

H=E9ctor S. Mendoza O. wrote:

Hector,

What I mean, is the database error log.

Thanks!

Patrick

>Here is the log from the web server...
>
>
>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] DBI
>connect('planos;localhost','web',...) failed: Access denied for user
>'web'@'localhost' (using password: YES) at
>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/planos .pl line 25
>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] 1 at
>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/planos .pl line 25.
>
>Here is the log if I run it from the shell
>
>[root@chihuahua cgi-bin]# ./planos.pl
>Content-type: text/html
>
>
>
>Planos Centro Comercial El Paseo Tehuacan
>
>
>
>
>DBI connect('planos;localhost','web',...) failed: Access denied for =
user
>'web'@'localhost' (using password: YES) at ./planos.pl line 25
>Error al conectarse con la base de datos
>
>
>1 at ./planos.pl line 25.
>[root@chihuahua cgi-bin]#
>
>Here is if I run it from mysql
>
>[root@chihuahua cgi-bin]# mysql -u web -h localhost -p planos
>Enter password:
>Welcome to the MySQL monitor. Commands end with ; or \g.
>Your MySQL connection id is 92 to server version: 4.1.10a-Max-log
>
>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
>mysql> quit
>Bye
>[root@chihuahua cgi-bin]#
>
>Thanks in advance!
>
>H=E9ctor S. Mendoza Ortiz
>
>
>-----Mensaje original-----
>De: Patrick Galbraith [mailto:patg@mysql.com]=20
>Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 12:16 p.m.
>Para: "H=E9ctor S. Mendoza O."
>CC: perl@lists.mysql.com
>Asunto: Re: Problem connecting
>
>H=E9ctor S. Mendoza O. wrote:
>
> =20
>
>>Hello all,=20
>>
>>Sorry I forgot to mention, I'm using the program in Linux, perl is =
v5.8.3
>>and MySQL is 4.1.10a.
>>
>>The script was working perfectly until I installed a php application =
that
>>required old_password set to 1 and an account with old password, =
thinking
>> =20
>>
>it
> =20
>
>>would not affect anything, I switched to old_password and changed
passwords
>>for old_password, the new app worked fine and 5 min later I received =
a
>> =20
>>
>call
> =20
>
>>that the rest of the apps where not working, I switched back to
>>old_password=3D0 switched again old_passwords to new passwords and =
still not
>>working.
>>
>>Any ideas?
>>
>>TIA
>>
>>H=E9ctor S. Mendoza Ortiz
>>
>>
>>=20
>>
>> =20
>>
>Hector,
>
>What does the error log say?
>
>regards,
>
>Patrick
>
>
>
> =20
>




--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: Problem connecting

am 17.05.2006 20:04:37 von Patrick Galbraith

Hector,

I'm not sure what you did with the access for this user (as described in
an earlier email). Can you:

Connect to the database specifying the actual hostname vs. "localhost"?
if yes: try with your script
if no: perhaps create a user (using GRANT, not modifying by hand
mysql.user) that can connect to the particular host, then
try to connect with the client, then connect with the script

Other than that, I'm not sure what the problem is. You modified your
privileges it seems, though I don't know what you mean by
"old_password". I would stick to using GRANT, and not modifying the
mysql.user table directly, which can only result in headaches as well as
having to issue "flush privileges". Whatever the problem is, it's not a
DBD::mysql issue as much as it is a privilege issue.

regards,

Patrick


Héctor S. Mendoza O. wrote:

>Here is the the contents of the mysql log for the past 12 hours
>
>060516 20:52:23 mysqld started
>060516 20:52:24 InnoDB: Started; log sequence number 0 50644802
>/usr/sbin/mysqld-max: ready for connections.
>Version: '4.1.10a-Max-log' socket: '/var/lib/mysql/mysql.sock' port: 3306
>MySQL Community Edition - Max (GPL)
>060517 12:42:11 [Note] /usr/sbin/mysqld-max: Normal shutdown
>
>060517 12:42:11 InnoDB: Starting shutdown...
>060517 12:42:12 InnoDB: Shutdown completed; log sequence number 0 50644839
>060517 12:42:12 [Note] /usr/sbin/mysqld-max: Shutdown complete
>
>060517 12:42:12 mysqld ended
>
>060517 12:42:13 mysqld started
>060517 12:42:14 InnoDB: Started; log sequence number 0 50644839
>/usr/sbin/mysqld-max: ready for connections.
>Version: '4.1.10a-Max-log' socket: '/var/lib/mysql/mysql.sock' port: 3306
>MySQL Community Edition - Max (GPL)
>
>Héctor S. Mendoza Ortiz
>
>-----Mensaje original-----
>De: Patrick Galbraith [mailto:patg@mysql.com]
>Enviado el: Miércoles, 17 de Mayo de 2006 12:36 p.m.
>Para: "Héctor S. Mendoza O."
>CC: perl@lists.mysql.com
>Asunto: Re: Problem connecting
>
>Héctor S. Mendoza O. wrote:
>
>Hector,
>
>What I mean, is the database error log.
>
>Thanks!
>
>Patrick
>
>
>
>>Here is the log from the web server...
>>
>>
>>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] DBI
>>connect('planos;localhost','web',...) failed: Access denied for user
>>'web'@'localhost' (using password: YES) at
>>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/plano s.pl line 25
>>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] 1 at
>>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/plano s.pl line 25.
>>
>>Here is the log if I run it from the shell
>>
>>[root@chihuahua cgi-bin]# ./planos.pl
>>Content-type: text/html
>>
>>
>>
>>Planos Centro Comercial El Paseo Tehuacan
>>
>>
>>
>>
>>DBI connect('planos;localhost','web',...) failed: Access denied for user
>>'web'@'localhost' (using password: YES) at ./planos.pl line 25
>>Error al conectarse con la base de datos
>>
>>
>>1 at ./planos.pl line 25.
>>[root@chihuahua cgi-bin]#
>>
>>Here is if I run it from mysql
>>
>>[root@chihuahua cgi-bin]# mysql -u web -h localhost -p planos
>>Enter password:
>>Welcome to the MySQL monitor. Commands end with ; or \g.
>>Your MySQL connection id is 92 to server version: 4.1.10a-Max-log
>>
>>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>>
>>mysql> quit
>>Bye
>>[root@chihuahua cgi-bin]#
>>
>>Thanks in advance!
>>
>>Héctor S. Mendoza Ortiz
>>
>>
>>-----Mensaje original-----
>>De: Patrick Galbraith [mailto:patg@mysql.com]
>>Enviado el: Miércoles, 17 de Mayo de 2006 12:16 p.m.
>>Para: "Héctor S. Mendoza O."
>>CC: perl@lists.mysql.com
>>Asunto: Re: Problem connecting
>>
>>Héctor S. Mendoza O. wrote:
>>
>>
>>
>>
>>
>>>Hello all,
>>>
>>>Sorry I forgot to mention, I'm using the program in Linux, perl is v5.8.3
>>>and MySQL is 4.1.10a.
>>>
>>>The script was working perfectly until I installed a php application that
>>>required old_password set to 1 and an account with old password, thinking
>>>
>>>
>>>
>>>
>>it
>>
>>
>>
>>
>>>would not affect anything, I switched to old_password and changed
>>>
>>>
>passwords
>
>
>>>for old_password, the new app worked fine and 5 min later I received a
>>>
>>>
>>>
>>>
>>call
>>
>>
>>
>>
>>>that the rest of the apps where not working, I switched back to
>>>old_password=0 switched again old_passwords to new passwords and still not
>>>working.
>>>
>>>Any ideas?
>>>
>>>TIA
>>>
>>>Héctor S. Mendoza Ortiz
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>Hector,
>>
>>What does the error log say?
>>
>>regards,
>>
>>Patrick
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Problem connecting

am 17.05.2006 20:07:37 von Patrick Galbraith

Héctor S. Mendoza O. wrote:

If your password has some characters that need to be escaped and aren't,
perhaps that might be the issue. Try changing to a alphanumeric password
(using GRANT syntax) if your current password has non-alphanumeric
characters.

btw - please turn off the email receipt confirmation to me ;)

>Here is another log file running mysql with --log=/tmp/connections.log
>
>[root@chihuahua root]# cat /tmp/connections.log
>/usr/sbin/mysqld-max, Version: 4.1.10a-Max-log. started with:
>Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
>Time Id Command Argument
>060517 12:59:08 1 Connect Access denied for user 'web'@'localhost'
>(using password: YES)
>060517 12:59:22 2 Connect web@localhost on planos
>060517 12:59:23 2 Quit
>[root@chihuahua root]#
>
>Connection 1 is from the script, connection 2 is from the 'mysql -u web -h
>localhost -p planos'
>
>I already double checked passwords and I'm typing in both the same password
>
>TIA
>
>Héctor S. Mendoza Ortiz
>
>-----Mensaje original-----
>De: Patrick Galbraith [mailto:patg@mysql.com]
>Enviado el: Miércoles, 17 de Mayo de 2006 12:36 p.m.
>Para: "Héctor S. Mendoza O."
>CC: perl@lists.mysql.com
>Asunto: Re: Problem connecting
>
>Héctor S. Mendoza O. wrote:
>
>Hector,
>
>What I mean, is the database error log.
>
>Thanks!
>
>Patrick
>
>
>
>>Here is the log from the web server...
>>
>>
>>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] DBI
>>connect('planos;localhost','web',...) failed: Access denied for user
>>'web'@'localhost' (using password: YES) at
>>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/plano s.pl line 25
>>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] 1 at
>>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/plano s.pl line 25.
>>
>>Here is the log if I run it from the shell
>>
>>[root@chihuahua cgi-bin]# ./planos.pl
>>Content-type: text/html
>>
>>
>>
>>Planos Centro Comercial El Paseo Tehuacan
>>
>>
>>
>>
>>DBI connect('planos;localhost','web',...) failed: Access denied for user
>>'web'@'localhost' (using password: YES) at ./planos.pl line 25
>>Error al conectarse con la base de datos
>>
>>
>>1 at ./planos.pl line 25.
>>[root@chihuahua cgi-bin]#
>>
>>Here is if I run it from mysql
>>
>>[root@chihuahua cgi-bin]# mysql -u web -h localhost -p planos
>>Enter password:
>>Welcome to the MySQL monitor. Commands end with ; or \g.
>>Your MySQL connection id is 92 to server version: 4.1.10a-Max-log
>>
>>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>>
>>mysql> quit
>>Bye
>>[root@chihuahua cgi-bin]#
>>
>>Thanks in advance!
>>
>>Héctor S. Mendoza Ortiz
>>
>>
>>-----Mensaje original-----
>>De: Patrick Galbraith [mailto:patg@mysql.com]
>>Enviado el: Miércoles, 17 de Mayo de 2006 12:16 p.m.
>>Para: "Héctor S. Mendoza O."
>>CC: perl@lists.mysql.com
>>Asunto: Re: Problem connecting
>>
>>Héctor S. Mendoza O. wrote:
>>
>>
>>
>>
>>
>>>Hello all,
>>>
>>>Sorry I forgot to mention, I'm using the program in Linux, perl is v5.8.3
>>>and MySQL is 4.1.10a.
>>>
>>>The script was working perfectly until I installed a php application that
>>>required old_password set to 1 and an account with old password, thinking
>>>
>>>
>>>
>>>
>>it
>>
>>
>>
>>
>>>would not affect anything, I switched to old_password and changed
>>>
>>>
>passwords
>
>
>>>for old_password, the new app worked fine and 5 min later I received a
>>>
>>>
>>>
>>>
>>call
>>
>>
>>
>>
>>>that the rest of the apps where not working, I switched back to
>>>old_password=0 switched again old_passwords to new passwords and still not
>>>working.
>>>
>>>Any ideas?
>>>
>>>TIA
>>>
>>>Héctor S. Mendoza Ortiz
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>Hector,
>>
>>What does the error log say?
>>
>>regards,
>>
>>Patrick
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

RE: Problem connecting

am 17.05.2006 20:23:49 von Hector

Patrick:

I tried already replacing localhost with hostname and ip address and i =
get
the same result, I can connect using mysql command but not the script.

Regarding the user, I thought also that I messed up the user, I deleted =
the
user and create it again, I used for this command line and "MySQL
Administrator" tool and in both I got the same result.

As far as the old_password in mysql 4.1 there was a change in password
hashing, I've searched everywhere and found that since 4.1 there's been =
a
lot of problems specially with php regarding this change in password
hashing, the new app I was trying to install required old_password=3D1 =
in the
/etc/my.cfg and a change in the password SET OLD_PASSWORD('secret') =
instead
of SET PASSWORD('secret')

Regarding my password having characters that need to be escaped, I have
none, it's just letters [aA..zZ] and numbers [0..9], so the password
escaping is not the issue also.

The weird thing and why I think is perl (DBD, DBI) the problem is that I =
can
connect to mysql via the command line with the same user, password, host =
and
database and the perl script can't.

Regarding the email receipt, sorry, it's a security issue on the =
company,
actually I don't have it configured on my mail tool, but it's enforced =
by
the mail server. I'll try to contact the sysadmin to turn you off email
receipt.

Thanks again for the help

H=E9ctor S. Mendoza Ortiz

-----Mensaje original-----
De: Patrick Galbraith [mailto:patg@mysql.com]=20
Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 01:08 p.m.
Para: "H=E9ctor S. Mendoza O."
CC: perl@lists.mysql.com
Asunto: Re: Problem connecting

H=E9ctor S. Mendoza O. wrote:

If your password has some characters that need to be escaped and aren't, =

perhaps that might be the issue. Try changing to a alphanumeric password =

(using GRANT syntax) if your current password has non-alphanumeric=20
characters.

btw - please turn off the email receipt confirmation to me ;)

>Here is another log file running mysql with =
--log=3D/tmp/connections.log
>
>[root@chihuahua root]# cat /tmp/connections.log
>/usr/sbin/mysqld-max, Version: 4.1.10a-Max-log. started with:
>Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
>Time Id Command Argument
>060517 12:59:08 1 Connect Access denied for user
'web'@'localhost'
>(using password: YES)
>060517 12:59:22 2 Connect web@localhost on planos
>060517 12:59:23 2 Quit
>[root@chihuahua root]#
>
>Connection 1 is from the script, connection 2 is from the 'mysql -u web =
-h
>localhost -p planos'
>
>I already double checked passwords and I'm typing in both the same =
password
>
>TIA
>
>H=E9ctor S. Mendoza Ortiz
>
>-----Mensaje original-----
>De: Patrick Galbraith [mailto:patg@mysql.com]=20
>Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 12:36 p.m.
>Para: "H=E9ctor S. Mendoza O."
>CC: perl@lists.mysql.com
>Asunto: Re: Problem connecting
>
>H=E9ctor S. Mendoza O. wrote:
>
>Hector,
>
>What I mean, is the database error log.
>
>Thanks!
>
>Patrick
>
> =20
>
>>Here is the log from the web server...
>>
>>
>>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] DBI
>>connect('planos;localhost','web',...) failed: Access denied for user
>>'web'@'localhost' (using password: YES) at
>>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/plano s.pl line 25
>>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] 1 at
>>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/plano s.pl line =
25.
>>
>>Here is the log if I run it from the shell
>>
>>[root@chihuahua cgi-bin]# ./planos.pl
>>Content-type: text/html
>>
>>
>>
>>Planos Centro Comercial El Paseo Tehuacan
>>
>>
>>
>>
>>DBI connect('planos;localhost','web',...) failed: Access denied for =
user
>>'web'@'localhost' (using password: YES) at ./planos.pl line 25
>>Error al conectarse con la base de datos
>>
>>
>>1 at ./planos.pl line 25.
>>[root@chihuahua cgi-bin]#
>>
>>Here is if I run it from mysql
>>
>>[root@chihuahua cgi-bin]# mysql -u web -h localhost -p planos
>>Enter password:
>>Welcome to the MySQL monitor. Commands end with ; or \g.
>>Your MySQL connection id is 92 to server version: 4.1.10a-Max-log
>>
>>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>>
>>mysql> quit
>>Bye
>>[root@chihuahua cgi-bin]#
>>
>>Thanks in advance!
>>
>>H=E9ctor S. Mendoza Ortiz
>>
>>
>>-----Mensaje original-----
>>De: Patrick Galbraith [mailto:patg@mysql.com]=20
>>Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 12:16 p.m.
>>Para: "H=E9ctor S. Mendoza O."
>>CC: perl@lists.mysql.com
>>Asunto: Re: Problem connecting
>>
>>H=E9ctor S. Mendoza O. wrote:
>>
>>=20
>>
>> =20
>>
>>>Hello all,=20
>>>
>>>Sorry I forgot to mention, I'm using the program in Linux, perl is =
v5.8.3
>>>and MySQL is 4.1.10a.
>>>
>>>The script was working perfectly until I installed a php application =
that
>>>required old_password set to 1 and an account with old password, =
thinking
>>> =20
>>>
>>> =20
>>>
>>it
>>=20
>>
>> =20
>>
>>>would not affect anything, I switched to old_password and changed
>>> =20
>>>
>passwords
> =20
>
>>>for old_password, the new app worked fine and 5 min later I received =
a
>>> =20
>>>
>>> =20
>>>
>>call
>>=20
>>
>> =20
>>
>>>that the rest of the apps where not working, I switched back to
>>>old_password=3D0 switched again old_passwords to new passwords and =
still
not
>>>working.
>>>
>>>Any ideas?
>>>
>>>TIA
>>>
>>>H=E9ctor S. Mendoza Ortiz
>>>
>>>
>>>
>>>
>>> =20
>>>
>>> =20
>>>
>>Hector,
>>
>>What does the error log say?
>>
>>regards,
>>
>>Patrick
>>
>>
>>
>>=20
>>
>> =20
>>
>
>
>
> =20
>




--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: Problem connecting

am 17.05.2006 20:32:19 von Patrick Galbraith

Héctor S. Mendoza O. wrote:

Hector,

hmmm, try perhaps setting a DBD->trace and see what exactly the script
is doing. I'm a bit baffled why it won't work. It worked before your
change for PHP right?

regards,

Patrick

>Patrick:
>
>I tried already replacing localhost with hostname and ip address and i get
>the same result, I can connect using mysql command but not the script.
>
>Regarding the user, I thought also that I messed up the user, I deleted the
>user and create it again, I used for this command line and "MySQL
>Administrator" tool and in both I got the same result.
>
>As far as the old_password in mysql 4.1 there was a change in password
>hashing, I've searched everywhere and found that since 4.1 there's been a
>lot of problems specially with php regarding this change in password
>hashing, the new app I was trying to install required old_password=1 in the
>/etc/my.cfg and a change in the password SET OLD_PASSWORD('secret') instead
>of SET PASSWORD('secret')
>
>Regarding my password having characters that need to be escaped, I have
>none, it's just letters [aA..zZ] and numbers [0..9], so the password
>escaping is not the issue also.
>
>The weird thing and why I think is perl (DBD, DBI) the problem is that I can
>connect to mysql via the command line with the same user, password, host and
>database and the perl script can't.
>
>Regarding the email receipt, sorry, it's a security issue on the company,
>actually I don't have it configured on my mail tool, but it's enforced by
>the mail server. I'll try to contact the sysadmin to turn you off email
>receipt.
>
>Thanks again for the help
>
>Héctor S. Mendoza Ortiz
>
>-----Mensaje original-----
>De: Patrick Galbraith [mailto:patg@mysql.com]
>Enviado el: Miércoles, 17 de Mayo de 2006 01:08 p.m.
>Para: "Héctor S. Mendoza O."
>CC: perl@lists.mysql.com
>Asunto: Re: Problem connecting
>
>Héctor S. Mendoza O. wrote:
>
>If your password has some characters that need to be escaped and aren't,
>perhaps that might be the issue. Try changing to a alphanumeric password
>(using GRANT syntax) if your current password has non-alphanumeric
>characters.
>
>btw - please turn off the email receipt confirmation to me ;)
>
>
>
>>Here is another log file running mysql with --log=/tmp/connections.log
>>
>>[root@chihuahua root]# cat /tmp/connections.log
>>/usr/sbin/mysqld-max, Version: 4.1.10a-Max-log. started with:
>>Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
>>Time Id Command Argument
>>060517 12:59:08 1 Connect Access denied for user
>>
>>
>'web'@'localhost'
>
>
>>(using password: YES)
>>060517 12:59:22 2 Connect web@localhost on planos
>>060517 12:59:23 2 Quit
>>[root@chihuahua root]#
>>
>>Connection 1 is from the script, connection 2 is from the 'mysql -u web -h
>>localhost -p planos'
>>
>>I already double checked passwords and I'm typing in both the same password
>>
>>TIA
>>
>>Héctor S. Mendoza Ortiz
>>
>>-----Mensaje original-----
>>De: Patrick Galbraith [mailto:patg@mysql.com]
>>Enviado el: Miércoles, 17 de Mayo de 2006 12:36 p.m.
>>Para: "Héctor S. Mendoza O."
>>CC: perl@lists.mysql.com
>>Asunto: Re: Problem connecting
>>
>>Héctor S. Mendoza O. wrote:
>>
>>Hector,
>>
>>What I mean, is the database error log.
>>
>>Thanks!
>>
>>Patrick
>>
>>
>>
>>
>>
>>>Here is the log from the web server...
>>>
>>>
>>>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] DBI
>>>connect('planos;localhost','web',...) failed: Access denied for user
>>>'web'@'localhost' (using password: YES) at
>>>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/plan os.pl line 25
>>>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] 1 at
>>>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/plan os.pl line 25.
>>>
>>>Here is the log if I run it from the shell
>>>
>>>[root@chihuahua cgi-bin]# ./planos.pl
>>>Content-type: text/html
>>>
>>>
>>>
>>>Planos Centro Comercial El Paseo Tehuacan
>>>
>>>
>>>
>>>
>>>DBI connect('planos;localhost','web',...) failed: Access denied for user
>>>'web'@'localhost' (using password: YES) at ./planos.pl line 25
>>>Error al conectarse con la base de datos
>>>
>>>
>>>1 at ./planos.pl line 25.
>>>[root@chihuahua cgi-bin]#
>>>
>>>Here is if I run it from mysql
>>>
>>>[root@chihuahua cgi-bin]# mysql -u web -h localhost -p planos
>>>Enter password:
>>>Welcome to the MySQL monitor. Commands end with ; or \g.
>>>Your MySQL connection id is 92 to server version: 4.1.10a-Max-log
>>>
>>>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>>>
>>>mysql> quit
>>>Bye
>>>[root@chihuahua cgi-bin]#
>>>
>>>Thanks in advance!
>>>
>>>Héctor S. Mendoza Ortiz
>>>
>>>
>>>-----Mensaje original-----
>>>De: Patrick Galbraith [mailto:patg@mysql.com]
>>>Enviado el: Miércoles, 17 de Mayo de 2006 12:16 p.m.
>>>Para: "Héctor S. Mendoza O."
>>>CC: perl@lists.mysql.com
>>>Asunto: Re: Problem connecting
>>>
>>>Héctor S. Mendoza O. wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>>Hello all,
>>>>
>>>>Sorry I forgot to mention, I'm using the program in Linux, perl is v5.8.3
>>>>and MySQL is 4.1.10a.
>>>>
>>>>The script was working perfectly until I installed a php application that
>>>>required old_password set to 1 and an account with old password, thinking
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>it
>>>
>>>
>>>
>>>
>>>
>>>
>>>>would not affect anything, I switched to old_password and changed
>>>>
>>>>
>>>>
>>>>
>>passwords
>>
>>
>>
>>
>>>>for old_password, the new app worked fine and 5 min later I received a
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>call
>>>
>>>
>>>
>>>
>>>
>>>
>>>>that the rest of the apps where not working, I switched back to
>>>>old_password=0 switched again old_passwords to new passwords and still
>>>>
>>>>
>not
>
>
>>>>working.
>>>>
>>>>Any ideas?
>>>>
>>>>TIA
>>>>
>>>>Héctor S. Mendoza Ortiz
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>Hector,
>>>
>>>What does the error log say?
>>>
>>>regards,
>>>
>>>Patrick
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>
>
>
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

RE: Problem connecting

am 17.05.2006 20:44:52 von Hector

Patrick:

The script has been running since mid January, and stopped working after =
I
made the old_password modifications. I already undid all the =
modifications
and still doesn't work.

Here is with DBI_TRACE=3D3

[root@chihuahua root]#
/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/planos. pl
DBI 1.50-ithread default trace level set to 0x0/3 (pid 2094)
Name "main::orden" used only once: possible typo at
/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/planos. pl line 35.
Content-type: text/html



Planos Centro Comercial El Paseo Tehuacan




-> DBI->connect(dbi:mysql:planos;localhost, web, ****)
-> DBI->install_driver(mysql) for linux perl=3D5.008003 pid=3D2094 =
ruid=3D0
euid=3D0
install_driver: DBD::mysql version 3.0003 loaded from
/usr/lib/perl5/site_perl/5.8.3/sparc-linux-thread-multi/DBD/ mysql.pm
New DBI::dr (for DBD::mysql::dr, parent=3D, id=3D)
=
dbih_setup_handle(DBI::dr=3DHASH(0x1dc7fc)=3D>DBI::dr=3DHASH (0x186734),
DBD::mysql::dr, 0, Null!)
dbih_make_com(Null!, 0, DBD::mysql::dr, 84, 0) thr#24008
<- install_driver=3D DBI::dr=3DHASH(0x1dc7fc)
-> connect for DBD::mysql::dr (DBI::dr=3DHASH(0x1dc7fc)~0x186734
'planos;localhost' 'web' **** HASH(0x269074)) thr#24008
New DBI::db (for DBD::mysql::db, parent=3DDBI::dr=3DHASH(0x186734),
id=3DHASH(0x2690e0))
=
dbih_setup_handle(DBI::db=3DHASH(0x18671c)=3D>DBI::db=3DHASH (0x2690a4),
DBD::mysql::db, 1d958c, HASH(0x2690e0))
dbih_make_com(DBI::dr=3DHASH(0x186734), 3c0f8, DBD::mysql::db, 1072,
2690bc) thr#24008
imp_dbh->connect: dsn =3D planos;localhost, uid =3D web, pwd =3D secret
imp_dbh->my_login : dbname =3D planos, uid =3D web, pwd =3D secret,host =
=3D
localhost, port =3D NULL
imp_dbh->mysql_dr_connect: host =3D |localhost|, port =3D 0, uid =3D =
web, pwd =3D
secret
imp_dbh->mysql_dr_connect: client_flags =3D 2
imp_dbh->mysql_dr_connect: <-Access denied for user 'web'@'localhost' =
(using
password: YES) error 1045 recorded: Access denied for user =
'web'@'localhost'
(using password: YES)
<> DESTROY(DBI::db=3DHASH(0x18671c)) ignored for outer handle (inner
DBI::db=3DHASH(0x2690a4) has ref cnt 2)
-> DESTROY for DBD::mysql::db (DBI::db=3DHASH(0x2690a4)~INNER) =
thr#24008
DESTROY for DBI::db=3DHASH(0x2690a4) ignored - handle not =
initialised
ERROR: 1045 'Access denied for user 'web'@'localhost' (using
password: YES)' (err#0)
<- DESTROY=3D undef at DBI.pm line 617
!! ERROR: 1045 'Access denied for user 'web'@'localhost' (using
password: YES)' (err#0)
<- connect=3D undef at DBI.pm line 617
-> $DBI::errstr (&) FETCH from lasth=3DHASH
>> DBD::mysql::dr::errstr
<- $DBI::errstr=3D 'Access denied for user 'web'@'localhost' (using
password: YES)'
DBI connect('planos;localhost','web',...) failed: Access denied =
for
user 'web'@'localhost' (using password: YES)
DBI connect('planos;localhost','web',...) failed: Access denied for user
'web'@'localhost' (using password: YES) at
/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/planos. pl line 25
Error al conectarse con la base de datos


1 at /ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/planos. pl line =
25.
-- DBI::END
-> disconnect_all for DBD::mysql::dr =
(DBI::dr=3DHASH(0x1dc7fc)~0x186734)
thr#24008
<- disconnect_all=3D (not implemented) at DBI.pm line 692 via
/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/planos. pl line 0
! -> DESTROY in DBD::_::common for DBD::mysql::dr
(DBI::dr=3DHASH(0x186734)~INNER) thr#24008
! <- DESTROY=3D undef during global destruction
! <> DESTROY for DBI::dr=3DHASH(0x1dc7fc) ignored (inner handle gone)
[root@chihuahua root]#


TIA

H=E9ctor S. Mendoza Ortiz

-----Mensaje original-----
De: Patrick Galbraith [mailto:patg@mysql.com]=20
Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 01:32 p.m.
Para: "H=E9ctor S. Mendoza O."
CC: perl@lists.mysql.com
Asunto: Re: Problem connecting

H=E9ctor S. Mendoza O. wrote:

Hector,

hmmm, try perhaps setting a DBD->trace and see what exactly the script=20
is doing. I'm a bit baffled why it won't work. It worked before your=20
change for PHP right?

regards,

Patrick

>Patrick:
>
>I tried already replacing localhost with hostname and ip address and i =
get
>the same result, I can connect using mysql command but not the script.
>
>Regarding the user, I thought also that I messed up the user, I deleted =
the
>user and create it again, I used for this command line and "MySQL
>Administrator" tool and in both I got the same result.
>
>As far as the old_password in mysql 4.1 there was a change in password
>hashing, I've searched everywhere and found that since 4.1 there's been =
a
>lot of problems specially with php regarding this change in password
>hashing, the new app I was trying to install required old_password=3D1 =
in the
>/etc/my.cfg and a change in the password SET OLD_PASSWORD('secret') =
instead
>of SET PASSWORD('secret')
>
>Regarding my password having characters that need to be escaped, I have
>none, it's just letters [aA..zZ] and numbers [0..9], so the password
>escaping is not the issue also.
>
>The weird thing and why I think is perl (DBD, DBI) the problem is that =
I
can
>connect to mysql via the command line with the same user, password, =
host
and
>database and the perl script can't.
>
>Regarding the email receipt, sorry, it's a security issue on the =
company,
>actually I don't have it configured on my mail tool, but it's enforced =
by
>the mail server. I'll try to contact the sysadmin to turn you off email
>receipt.
>
>Thanks again for the help
>
>H=E9ctor S. Mendoza Ortiz
>
>-----Mensaje original-----
>De: Patrick Galbraith [mailto:patg@mysql.com]=20
>Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 01:08 p.m.
>Para: "H=E9ctor S. Mendoza O."
>CC: perl@lists.mysql.com
>Asunto: Re: Problem connecting
>
>H=E9ctor S. Mendoza O. wrote:
>
>If your password has some characters that need to be escaped and =
aren't,=20
>perhaps that might be the issue. Try changing to a alphanumeric =
password=20
>(using GRANT syntax) if your current password has non-alphanumeric=20
>characters.
>
>btw - please turn off the email receipt confirmation to me ;)
>
> =20
>
>>Here is another log file running mysql with =
--log=3D/tmp/connections.log
>>
>>[root@chihuahua root]# cat /tmp/connections.log
>>/usr/sbin/mysqld-max, Version: 4.1.10a-Max-log. started with:
>>Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
>>Time Id Command Argument
>>060517 12:59:08 1 Connect Access denied for user
>> =20
>>
>'web'@'localhost'
> =20
>
>>(using password: YES)
>>060517 12:59:22 2 Connect web@localhost on planos
>>060517 12:59:23 2 Quit
>>[root@chihuahua root]#
>>
>>Connection 1 is from the script, connection 2 is from the 'mysql -u =
web -h
>>localhost -p planos'
>>
>>I already double checked passwords and I'm typing in both the same
password
>>
>>TIA
>>
>>H=E9ctor S. Mendoza Ortiz
>>
>>-----Mensaje original-----
>>De: Patrick Galbraith [mailto:patg@mysql.com]=20
>>Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 12:36 p.m.
>>Para: "H=E9ctor S. Mendoza O."
>>CC: perl@lists.mysql.com
>>Asunto: Re: Problem connecting
>>
>>H=E9ctor S. Mendoza O. wrote:
>>
>>Hector,
>>
>>What I mean, is the database error log.
>>
>>Thanks!
>>
>>Patrick
>>
>>=20
>>
>> =20
>>
>>>Here is the log from the web server...
>>>
>>>
>>>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] DBI
>>>connect('planos;localhost','web',...) failed: Access denied for user
>>>'web'@'localhost' (using password: YES) at
>>>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/plan os.pl line =
25
>>>[Tue May 16 21:22:54 2006] [error] [client 10.0.10.1] 1 at
>>>/ispman/domains/elpaseo.com.mx/vhosts/planos/cgi-bin/plan os.pl line =
25.
>>>
>>>Here is the log if I run it from the shell
>>>
>>>[root@chihuahua cgi-bin]# ./planos.pl
>>>Content-type: text/html
>>>
>>>
>>>
>>>Planos Centro Comercial El Paseo Tehuacan
>>>
>>>
>>>
>>>
>>>DBI connect('planos;localhost','web',...) failed: Access denied for =
user
>>>'web'@'localhost' (using password: YES) at ./planos.pl line 25
>>>Error al conectarse con la base de datos
>>>
>>>
>>>1 at ./planos.pl line 25.
>>>[root@chihuahua cgi-bin]#
>>>
>>>Here is if I run it from mysql
>>>
>>>[root@chihuahua cgi-bin]# mysql -u web -h localhost -p planos
>>>Enter password:
>>>Welcome to the MySQL monitor. Commands end with ; or \g.
>>>Your MySQL connection id is 92 to server version: 4.1.10a-Max-log
>>>
>>>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>>>
>>>mysql> quit
>>>Bye
>>>[root@chihuahua cgi-bin]#
>>>
>>>Thanks in advance!
>>>
>>>H=E9ctor S. Mendoza Ortiz
>>>
>>>
>>>-----Mensaje original-----
>>>De: Patrick Galbraith [mailto:patg@mysql.com]=20
>>>Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 12:16 p.m.
>>>Para: "H=E9ctor S. Mendoza O."
>>>CC: perl@lists.mysql.com
>>>Asunto: Re: Problem connecting
>>>
>>>H=E9ctor S. Mendoza O. wrote:
>>>
>>>
>>>
>>> =20
>>>
>>> =20
>>>
>>>>Hello all,=20
>>>>
>>>>Sorry I forgot to mention, I'm using the program in Linux, perl is
v5.8.3
>>>>and MySQL is 4.1.10a.
>>>>
>>>>The script was working perfectly until I installed a php application
that
>>>>required old_password set to 1 and an account with old password,
thinking
>>>> =20
>>>>
>>>> =20
>>>>
>>>> =20
>>>>
>>>it
>>>
>>>
>>> =20
>>>
>>> =20
>>>
>>>>would not affect anything, I switched to old_password and changed
>>>> =20
>>>>
>>>> =20
>>>>
>>passwords
>>=20
>>
>> =20
>>
>>>>for old_password, the new app worked fine and 5 min later I =
received a
>>>> =20
>>>>
>>>> =20
>>>>
>>>> =20
>>>>
>>>call
>>>
>>>
>>> =20
>>>
>>> =20
>>>
>>>>that the rest of the apps where not working, I switched back to
>>>>old_password=3D0 switched again old_passwords to new passwords and =
still
>>>> =20
>>>>
>not
> =20
>
>>>>working.
>>>>
>>>>Any ideas?
>>>>
>>>>TIA
>>>>
>>>>H=E9ctor S. Mendoza Ortiz
>>>>
>>>>
>>>>
>>>>
>>>> =20
>>>>
>>>> =20
>>>>
>>>> =20
>>>>
>>>Hector,
>>>
>>>What does the error log say?
>>>
>>>regards,
>>>
>>>Patrick
>>>
>>>
>>>
>>>
>>>
>>> =20
>>>
>>> =20
>>>
>>
>>=20
>>
>> =20
>>
>
>
>
> =20
>




--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

RE: Problem connecting

am 17.05.2006 23:23:18 von Hector

Here it is...

[root@chihuahua root]# mysql -uweb -hlocalhost -psecret planos
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15 to server version: 4.1.10a-Max-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> quit
Bye
[root@chihuahua root]#

TIA

H=E9ctor S. Mendoza Ortiz

-----Mensaje original-----
De: w@sfgate.com [mailto:w@sfgate.com]=20
Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 03:34 p.m.
Para: H?ctor S. Mendoza O.
Asunto: Re: Problem connecting

On Wed, May 17, 2006 at 01:01:18PM -0500, H?ctor S. Mendoza O. wrote:
> >[root@chihuahua cgi-bin]# mysql -u web -h localhost -p planos
> >Enter password:
> >Welcome to the MySQL monitor. Commands end with ; or \g.

Last argument in command line is the database name,
thus password is invisible here and confusing.
Use no spaces after option key to be certain:
mysql -uweb -hlocalhost -psecret planos

It sounds you have empty password set for user web@localhost.
Try
SELECT host,user,password FROM user
to see what is actually set.

--w



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: Problem connecting

am 17.05.2006 23:48:35 von w

Now, what

> SELECT host,user,password FROM user

shows? (not needed to show output in email)

Where you have old passwords,
they will be short, such as

+---------------+---------+------------------+
| host | user | password |
+---------------+---------+------------------+
| localhost | root | 6ab112233de44558 |

New passwords are longer:

+-----------+---------+------------------------------------- ------+
| host | user | password |
+-----------+---------+------------------------------------- ------+
| localhost | root | *17A3A389744F3F39AC4CE4CCFCAD6960D8EA03C9 |

If your web server is not localhost,
mix of web's old and new passwords may cause connection failure.

--w


On Wed, May 17, 2006 at 04:23:18PM -0500, H?ctor S. Mendoza O. wrote:
> Here it is...
>
> [root@chihuahua root]# mysql -uweb -hlocalhost -psecret planos
> Welcome to the MySQL monitor. Commands end with ; or \g.
> Your MySQL connection id is 15 to server version: 4.1.10a-Max-log
>
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
> mysql> quit
> Bye
> [root@chihuahua root]#
>
> TIA
>
> H?ctor S. Mendoza Ortiz
>
> -----Mensaje original-----
> De: w@sfgate.com [mailto:w@sfgate.com]
> Enviado el: Mi?rcoles, 17 de Mayo de 2006 03:34 p.m.
> Para: H?ctor S. Mendoza O.
> Asunto: Re: Problem connecting
>
> On Wed, May 17, 2006 at 01:01:18PM -0500, H?ctor S. Mendoza O. wrote:
> > >[root@chihuahua cgi-bin]# mysql -u web -h localhost -p planos
> > >Enter password:
> > >Welcome to the MySQL monitor. Commands end with ; or \g.
>
> Last argument in command line is the database name,
> thus password is invisible here and confusing.
> Use no spaces after option key to be certain:
> mysql -uweb -hlocalhost -psecret planos
>
> It sounds you have empty password set for user web@localhost.
> Try
> SELECT host,user,password FROM user
> to see what is actually set.
>
> --w

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

RE: Problem connecting

am 17.05.2006 23:59:53 von Hector

I have only one entry for the 'web' user

+------+------+-------------------------------------------+
| host | user | password |
+------+------+-------------------------------------------+
| % | web | *AA5DDEDA13B2251610E9F1ED81642FB705BABDE4 |
+------+------+-------------------------------------------+

I've tried again changing this to old password style, but still nothing.

There are no anonymous users (ie. =
Host=3D'localhost',user=3D'',passwd=3D'x'), I
already checked that for precedence on search for password on users

I already tried adding a host for localhost, for the IP address, for the
hostname of the server and I have the same result.

Thanks again for all the help received!

H=E9ctor S. Mendoza Ortiz

-----Mensaje original-----
De: w@sfgate.com [mailto:w@sfgate.com]=20
Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 04:49 p.m.
Para: perl@lists.mysql.com
Asunto: Re: Problem connecting

Now, what

> SELECT host,user,password FROM user

shows? (not needed to show output in email)

Where you have old passwords,
they will be short, such as

+---------------+---------+------------------+
| host | user | password |
+---------------+---------+------------------+
| localhost | root | 6ab112233de44558 |

New passwords are longer:

+-----------+---------+------------------------------------- ------+
| host | user | password |
+-----------+---------+------------------------------------- ------+
| localhost | root | *17A3A389744F3F39AC4CE4CCFCAD6960D8EA03C9 |

If your web server is not localhost,
mix of web's old and new passwords may cause connection failure.

--w


On Wed, May 17, 2006 at 04:23:18PM -0500, H?ctor S. Mendoza O. wrote:
> Here it is...
>=20
> [root@chihuahua root]# mysql -uweb -hlocalhost -psecret planos
> Welcome to the MySQL monitor. Commands end with ; or \g.
> Your MySQL connection id is 15 to server version: 4.1.10a-Max-log
>=20
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>=20
> mysql> quit
> Bye
> [root@chihuahua root]#
>=20
> TIA
>=20
> H?ctor S. Mendoza Ortiz
>=20
> -----Mensaje original-----
> De: w@sfgate.com [mailto:w@sfgate.com]=20
> Enviado el: Mi?rcoles, 17 de Mayo de 2006 03:34 p.m.
> Para: H?ctor S. Mendoza O.
> Asunto: Re: Problem connecting
>=20
> On Wed, May 17, 2006 at 01:01:18PM -0500, H?ctor S. Mendoza O. wrote:
> > >[root@chihuahua cgi-bin]# mysql -u web -h localhost -p planos
> > >Enter password:
> > >Welcome to the MySQL monitor. Commands end with ; or \g.
>=20
> Last argument in command line is the database name,
> thus password is invisible here and confusing.
> Use no spaces after option key to be certain:
> mysql -uweb -hlocalhost -psecret planos
>=20
> It sounds you have empty password set for user web@localhost.
> Try
> SELECT host,user,password FROM user
> to see what is actually set.
>=20
> --w

--=20
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:
http://lists.mysql.com/perl?unsub=3Dhector@acorporativa.com. mx




--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

RE: Problem connecting

am 18.05.2006 16:28:36 von Hector

Hello all...

First of all, thanks a lot to everybody that tried to help out in the
problem I had.... in the end what I ended up doing is I pulled out a =
backup
of all the databases one day before the breakdown, uninstalled mysql,
reinstalled (in the process upgraded and added some patches) and now my =
app
is working again.


Like I said thanks again to everybody that helped out!

H=E9ctor S. Mendoza Ortiz

-----Mensaje original-----
De: H=E9ctor S. Mendoza O. [mailto:hector@acorporativa.com.mx]=20
Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 05:00 p.m.
Para: w@sfgate.com; perl@lists.mysql.com
Asunto: RE: Problem connecting

I have only one entry for the 'web' user

+------+------+-------------------------------------------+
| host | user | password |
+------+------+-------------------------------------------+
| % | web | *AA5DDEDA13B2251610E9F1ED81642FB705BABDE4 |
+------+------+-------------------------------------------+

I've tried again changing this to old password style, but still nothing.

There are no anonymous users (ie. =
Host=3D'localhost',user=3D'',passwd=3D'x'), I
already checked that for precedence on search for password on users

I already tried adding a host for localhost, for the IP address, for the
hostname of the server and I have the same result.

Thanks again for all the help received!

H=E9ctor S. Mendoza Ortiz

-----Mensaje original-----
De: w@sfgate.com [mailto:w@sfgate.com]=20
Enviado el: Mi=E9rcoles, 17 de Mayo de 2006 04:49 p.m.
Para: perl@lists.mysql.com
Asunto: Re: Problem connecting

Now, what

> SELECT host,user,password FROM user

shows? (not needed to show output in email)

Where you have old passwords,
they will be short, such as

+---------------+---------+------------------+
| host | user | password |
+---------------+---------+------------------+
| localhost | root | 6ab112233de44558 |

New passwords are longer:

+-----------+---------+------------------------------------- ------+
| host | user | password |
+-----------+---------+------------------------------------- ------+
| localhost | root | *17A3A389744F3F39AC4CE4CCFCAD6960D8EA03C9 |

If your web server is not localhost,
mix of web's old and new passwords may cause connection failure.

--w


On Wed, May 17, 2006 at 04:23:18PM -0500, H?ctor S. Mendoza O. wrote:
> Here it is...
>=20
> [root@chihuahua root]# mysql -uweb -hlocalhost -psecret planos
> Welcome to the MySQL monitor. Commands end with ; or \g.
> Your MySQL connection id is 15 to server version: 4.1.10a-Max-log
>=20
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>=20
> mysql> quit
> Bye
> [root@chihuahua root]#
>=20
> TIA
>=20
> H?ctor S. Mendoza Ortiz
>=20
> -----Mensaje original-----
> De: w@sfgate.com [mailto:w@sfgate.com]=20
> Enviado el: Mi?rcoles, 17 de Mayo de 2006 03:34 p.m.
> Para: H?ctor S. Mendoza O.
> Asunto: Re: Problem connecting
>=20
> On Wed, May 17, 2006 at 01:01:18PM -0500, H?ctor S. Mendoza O. wrote:
> > >[root@chihuahua cgi-bin]# mysql -u web -h localhost -p planos
> > >Enter password:
> > >Welcome to the MySQL monitor. Commands end with ; or \g.
>=20
> Last argument in command line is the database name,
> thus password is invisible here and confusing.
> Use no spaces after option key to be certain:
> mysql -uweb -hlocalhost -psecret planos
>=20
> It sounds you have empty password set for user web@localhost.
> Try
> SELECT host,user,password FROM user
> to see what is actually set.
>=20
> --w

--=20
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:
http://lists.mysql.com/perl?unsub=3Dhector@acorporativa.com. mx




--=20
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:
http://lists.mysql.com/perl?unsub=3Dhector@acorporativa.com. mx




--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org