Re: not able to connect to mysql



HP wrote:
Hi All

this is my code:

$db = DBI->connect($dbpath, $dbuser , $dbpass) || die "cannot connect
to database".$DBI::errstr;

i am trying to connect to mysql database.when i am running as  perl
-cgi script on command line its working fine.
but when i am running it through browser its giving me this error .

Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock'

do anyone know the reason?




Probably a permissions issue. You missed the all important number off the end of that error message.




--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
.



Relevant Pages

  • Re: JETCOMP.exe utility switch to path to database to compact
    ... I ran the command line script many times. ... error message something about can't find the internal program. ... operable program or batch file. ...
    (microsoft.public.scripting.vbscript)
  • Re: [opensuse] CUPS error "client-error-not-authorized"
    ... For these type of Canon copier/printers there is ... Running this script in 10.0 and in 10.1 worked perfectly, ... is fine until the last step, then it gives the error message ... configuration command "codehost-config", ...
    (SuSE)
  • Re: su command problem
    ... >have not modified the mysql-server.sh script in any ... All that line does is run the 'date' command ... >as the mysql user. ... >something to do w/ the su command or security relating ...
    (freebsd-questions)
  • chmod error message 0481-014
    ... If I do the command as root ... but if I use my user account this message occurs. ... but the script fails because of there errors. ...
    (comp.unix.aix)
  • Re: vb script in XP
    ... But - when I again ran the vbs script I still recieve the error message ... recommending that you run the command ...
    (microsoft.public.windowsxp.general)