mySQL Perl Error 500

software development

#1

I have a perl script I’ve brought with me from my last host. It accesses a mySQL database and serves as a dealer locator for businesses. It worked flawlessly on my old host, but here I receive a 500 Internal Server Error. I exported the mySQL database and re-imported it here. All looks well. I update the perl script to match the new username and database location. This is the error I receive in the logs:

DBI connect(‘ziplook.drewperry.com’,‘ziplook’,…) failed: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) at ziplooktest.pl line 11
Can’t connect: at ziplooktest.pl line 11.

And line 11 from ziplooktest.pl is as follows:

$dbh = DBI->connect(“DBI:mysql:ziplook.drewperry.com”, “ziplook”, “ziplook”) ||
die “Can’t connect: $_”;

Can anyone tell me what that line should read? Yes, the username and password are both “ziplook” for simplicity’s sake. Many thanks in advance.
Drew


#2

possible this K-Base article will help. I see though that line 11 doesn’t say much, and looks correct to me. 500 server erroris saying that the script, for some reason isn’t being granted access to a file… maybe you sould check your CHMOD on the files associated with the script?

Also, I would really really really reccomend that you now change your username and password for that database seeing as you have opned up your database to malicious persons, with out even needing a script or something else to explot to do it. It would be extremly easy for me to go into your datbase and delete everything, or just abuut anything else! So yeah, go change it immeadtly.

-Matttail


#3

Thanks, I did get it to connect, however. Just took enough tinkering. However, now that I’m connecting, my data is not outputting like it should. The results of my Perl script query don’t display. Anyone willing to give me a hand please let me know. I’ll send you the perl script and see if you can’t figure it out. Thanks,
Drew


#4

I’m willing to help, send me Private messages here.

:cool: Perl / MySQL / HTML+CSS