Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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

by Codon (Friar)
on Jul 05, 2005 at 20:04 UTC ( #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, 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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://472586]
[Corion]: 1nickt: I bought a 2015 XPS 13, which is a very nice and shiney (and somewhat overpriced) machine, but I think it's still better priced than an Apple machine. Now it just has to hold up 10 years like the old one did ;)
[1nickt]: Ah, you got Linus' fave? With Ubuntu? 4k display?
[1nickt]: ( The 17" monster I just bought is for my wife, who doesn;t leave the house with it...)
[Corion]: 1nickt: No, I'm using it with Windows 10, but with the 4k display, yes. It's a very nice build IMO, and relatively sturdy. Also, it got 8 or 9 on the ifixit repair scale, which I consider good
[Corion]: ... especially as I expect to have to replace the battery set in two or three years' time

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2017-03-27 13:09 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.