Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to MySql but can't find socket

Status
Not open for further replies.

time2play

Programmer
Jul 2, 2002
10
US
Hello,

I am very new to Perl so this might be a very simple but I can't find the solution to it. I am trying to write a simple script that connects to a MySql DB and updates it with information from a form. My problem arises when I try and make the connection. I get the message:

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

I think this means that it can't find this file. I know where this file is located and it is not there. Is there anyway to explicity tell DBI where to look for this file.

Any help or code examples would be greatly appreciative.

When explaining please keep in mind that I am very new to Perl.
Thanks,
D
 
Forget about DBI for the moment - are you sure that the MySQL server software is up and running? Can you get into the MySQL client and execute queries?

Looks like you're on a *nix platform - you should be able to do a "ps -ef | grep mysql" and get one(or more) lines back. If you don't get any lines back, then MySQL isn't up. Hardy Merrill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top