Help for this page

Select Code to Download


  1. or download this
    $ mysql -u plankton -p --socket=/somewhere/mysql/mysql.sock
    
  2. or download this
    #perl -w
    ...
    my %attr = ( socket => '/somewhere/mysql/mysql.sock' );
    my $dbh = DBI->connect( "dbi:mysql:$db:$server", $user, $pw, \%attr );
    ...
    
  3. or download this
    DBI connect( 'blah:localhost', 'blah', ... ) failed: Can't connect to 
    +local MySQL server through socket '/var/lib/mysql/mysql.sock' ...