2 messages in com.mysql.lists.perlhelp: DBI perl mysql dbd-mysql| From | Sent On | Attachments |
|---|---|---|
| John S Brigham | 26 Aug 2003 12:09 | |
| Hans van Harten | 26 Aug 2003 13:38 |
| Subject: | help: DBI perl mysql dbd-mysql![]() |
|---|---|
| From: | John S Brigham (mrph...@juno.com) |
| Date: | 08/26/2003 12:09:36 PM |
| List: | com.mysql.lists.perl |
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 mrph...@juno.com
problems with MySQL. perl DBI DBD-Mysql
errors
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.
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=.
Driver:proxy 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
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.
. 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 mrph...@juno.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!




