Re: Perl-mysql




Siva Chaitanya Prasad Manne wrote:
Hi,

I would like to connect to a database stored at linux
machine from my Windows machine. But I am unable to connect to the mysql
server.



Please help me regarding this issue.





************************************************************************
****************************



use DBI;

$dbh = DBI->connect("DBI:mysql:employee:xxx.xxx.xxx.xx", 'root',
'abc123',

{ RaiseError => 1 }

);


When DBI fails to connect, it returns undef and puts the error message
in $DBI::errstr, so you should check those before proceeding in your
script.

#!/usr/bin/perl

use strict;
use warnings;
use DBI;

my $dbh = DBI->connect("DBI:mysql:employee:xxx.xxx.xxx.xx", 'root',
'abc123', { RaiseError => 1 } )
or die $DBI::errstr;

-Mark

.



Relevant Pages

  • Re: [SLE] Need help mounting a USB disk drive
    ... > be able to move that device between my Windows machine and my Linux machine. ... > The idea would be to convert one of those partitions into either an EXT2 ... > to create a high-level directory entry for use as a mount point and issue ...
    (SuSE)
  • Re: [opensuse] Iomega Rev drive
    ... it as a backup device. ... There is a device driver for Linux. ... another Linux machine or a Windows machine. ... than a REV disk, but we reuse them as they are only for data transport. ...
    (SuSE)
  • Re: avoid structure padding
    ... transfer between a windows machine and a linux I created a structure on ... both sides (ie on linux and on windows) and I sent using UDP ... between that layout and whatever data format the program finds ... tested data marshalling library. ...
    (comp.lang.c.moderated)
  • Re: HHeeellllllppp!!
    ... Data in your disk directory structure appears to has been corrupted. ... and connected it to a linux machine. ... it to do what we wanted, so we connected it to a windows machine. ... when I tried to go back to a connecting it to a windows machine, ...
    (microsoft.public.windowsxp.help_and_support)
  • RE: Remote Connections and port identification
    ... Remote Connections and port identification ... and it was sharing information on remote logins to windows machines from linux machines and it says at one point a linux machine 1 was forwarding information back over a public network through a secure remote network to another windows machine. ... If this was true, I'm thinking about performing an experiment where from my own windows machine, I will direct connect to a relativly unsecure LAN network down the street from my house, and connect to a windows 2k pro OS box I own, bypassing his server computer. ...
    (Security-Basics)

Quantcast