dbTalk Databases Forums  

help: DBI perl mysql dbd-mysql

mailing.database.msql-mysql-modules mailing.database.msql-mysql-modules


Discuss help: DBI perl mysql dbd-mysql in the mailing.database.msql-mysql-modules forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John S Brigham
 
Posts: n/a

Default help: DBI perl mysql dbd-mysql - 08-26-2003 , 01:13 PM






I am unable to get the perl to talk to the mysql.

I wrote an email to Jochen and he courtesouly and promptly replied. He
asked me use this address and to be more specific about the errors I am
seeing. A bit obvious I suppose.

I have been struggling with this for days and days;

John Brigham
Denver, Colorado
mrphysh (AT) juno (DOT) com

problems with MySQL. perl DBI DBD-Mysql

errors

Quote:
When the server is started:
c:\mysql\bin\mysqld.exe --console

gives error 30826 11:13:34 InnoDB: Operating system error number 32 in
file operation.
InnoDB: see http://www.innodb.com/ibman.html for installation help.
Innodb: error number 32 means broken pipe
Innodb: see also section 13.2 at http://www.innodb.com/ibman.html
Innodb: about operating system error numbers
Innodb: file name .\ibdata1
InnoDB: file operation call: 'open'.
Innodb: cannot continue operation.



c:\mysql\bin\mysqld

works fine. sometimes this kills my DOS prompt and I have to open
another command window.
The mysql works fine and I am getting familiar with it.





Quote:
this script is to find active database drivers. It seems to
work fine. I have been using it to see if the DBD-mysql is engaged.

#! /perl/bin/perl -w

use DBI;

my @drivers = DBI->available_drivers();

die "no drivers found!\n" unless @drivers;

foreach my $driver (@drivers){
print "Driver: $driver\n";
my @datasources = DBI->data_sources( $driver);
foreach my $datasource ( @datasources ) {
print "\tdata Source is $datasource\n";
}
print "\n";
}
exit;

I type
c:\mysql\bin\wps\perl -w whatdbd.pl

and get

Driver: ExampleP
data source is dbi:Examplep:dir=.

Driverroxy
install_driver (proxy)failed: can't locate RPC/Plclient.pm in @inc (@inc
contains: E:/perl/lib E:/perl/site/lib .) at
E:/perl/site/lib/DBD/proxy.pm line 28.
BEGIN failed--compilation aborted at E:/perl/site/lib/DBD/Proxy.pm line
28.
Compliation failed in require at (eval 2) line 3.
Perhaps a module that DBD::Proxy requires hasn't been fully installed at
whatdbd.pl line 11

Quote:
This is the perl script which I use against the mysql. I have
tried endless variations to no avail.

#! /usr/bin/perl -w

use DBI;

$database="meetageek";
$driver = "DBI:mysql";
my $dbh = DBI->connect($driver:database=$database,
"root","mrphysh") or die "cannot connect";

#insert the values
$dbh->do("INSERT INTO Customers (First_Name,Last_Name)
VALUES ('Rene','Robertson')");
$dbh->do("INSERT INTO Customers (First_Name,Last_Name)
VALUES ('Larry','Isaacson')");
$dbh->do("INSERT INTO Customers (First_Name,Last_Name)
VALUES ('Mark','Harrison')");

#Dissconnect from Database

$dbh ->disconnect;

This is typical of the error I see:

Unquoted string "database" may clash with future reserved word at
firstscript line 7.
syntax error at firstscript.pl line 7 near "$driver:"
execution of firstscript.pl aborted due to compilation errors.

Quote:
. I have tired endless variations. This one is called 5script.pl
#! /usr/bin/perl -w

use DBI;

$database="meetageek";
$driver = "DBI:mysql";
my $dbh = DBI->connect("DBI::mysql:meetageek","root","myphysh" ) ;

#insert the values
$dbh->do (INSERT INTO Customers VALUES
'Rene','Robertson');

#Dissconnect from Database

$dbh ->disconnect;

it gives this error:
name "main::database" used only once: possilbe typo at 5script.pl line
5.
name "main::driver" used only once: possible typo at 5script.pl line 6.
Can't connect (DBI::mysql:meetageek root mrphysh), no database driver
specified and DBI_)DSN env var not set at 5script.pl line7.

xxxxxxxxxxxxxxxxxxxxx
I have tried reloading all the software. I have tried different ppm
packages. I have endlessly used ppm to install and uninstall.

I have Active perl version 1.37 5.8.0.806MySQL version 4.0.14

windows 2000
pentium II
256 RAM
My compac has an E: drive and the perl seems to install there by default.

I am committed to this and stuck!

thanks
john brigham
2020 Vine Street
Denver CO 80205
303-333-3266
mrphysh (AT) juno (DOT) com

__________________________________________________ ______________
The best thing to hit the internet in years - Juno SpeedBand!
Surf the web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=ms...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.