List:MySQL and Perl« Previous MessageNext Message »
From:Héctor S. Mendoza O. Date:May 17 2006 6:23pm
Subject:RE: Problem connecting
View as plain text  
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@stripped] 
Enviado el: Miércoles, 17 de Mayo de 2006 01:08 p.m.
Para: "Héctor S. Mendoza O."
CC: perl@stripped
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@stripped] 
>Enviado el: Miércoles, 17 de Mayo de 2006 12:36 p.m.
>Para: "Héctor S. Mendoza O."
>CC: perl@stripped
>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/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
>>
>><html>
>><head>
>><title>Planos Centro Comercial El Paseo Tehuacan</title>
>></head>
>>
>><body bgcolor="white">
>>
>>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@stripped] 
>>Enviado el: Miércoles, 17 de Mayo de 2006 12:16 p.m.
>>Para: "Héctor S. Mendoza O."
>>CC: perl@stripped
>>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
>>
>>
>>
>> 
>>
>>    
>>
>
>
>
>  
>



Thread
Problem connectingHéctor S .  Mendoza O . 17 May
RE: Problem connectingHung Tran17 May
RE: Problem connectingHéctor S .  Mendoza O . 17 May
  • Re: Problem connectingPatrick Galbraith17 May
    • RE: Problem connectingHéctor S .  Mendoza O . 17 May
      • Re: Problem connectingPatrick Galbraith17 May
        • RE: Problem connectingHéctor S .  Mendoza O . 17 May
          • Re: Problem connectingPatrick Galbraith17 May
        • RE: Problem connectingHéctor S .  Mendoza O . 17 May
AW: Problem connectingGisbert W. Selke17 May
RE: Problem connectingHéctor S .  Mendoza O . 17 May
Re: Problem connectingPatrick Galbraith17 May
Re: Problem connectingPatrick Galbraith17 May
  • RE: Problem connectingHéctor S .  Mendoza O . 17 May
RE: Problem connectingHéctor S .  Mendoza O . 17 May
  • Re: Problem connectingVladimir V. Kolpakov17 May
    • RE: Problem connectingHéctor S .  Mendoza O . 17 May
      • RE: Problem connectingHéctor S .  Mendoza O . 18 May