Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Connecting to mysql using DBI and a non-standard socket

by Codon (Friar)
on Jul 05, 2005 at 20:04 UTC ( [id://472586]=note: print w/replies, xml ) Need Help??


in reply to Connecting to mysql using DBI and a non-standard socket

Why do you need connect via a the socket file? Presumably your mysql instance is listening for connections on a particular port number (default is 3306). In which case, you could use the command line
mysql -h localhost -P <port> -u root --password=password nemo
which would translate in DBI to
my $dbh = DBI->connect("DBI:mysql:database=nemo;host=localhost;port=$p +ort", 'root', 'password', \%attr);

Ivan Heffner
Sr. Software Engineer, DAS Lead
WhitePages.com, Inc.

Replies are listed 'Best First'.
Re^2: Connecting to mysql using DBI and a non-standard socket
by gellyfish (Monsignor) on Jul 05, 2005 at 20:18 UTC

    You might not want to have your mysqld listening on a TCP socket if there is no need for a client on another host to access the database. It makes for a more secure installation for one thing.

    /J\

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://472586]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-24 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found