Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Using MySQL with Perl

Reply
Thread Tools

Using MySQL with Perl

 
 
philsfan17
Guest
Posts: n/a
 
      02-04-2005
I'm having a problem running a perl script that uses mySQL. I have
installed both DBI and DBD-mysql using ppm, but when I run a script
that has use mysql in it, I get this error:

Had to create DBI::_dbistate unexpectedly at C:/Perl/lib/DynaLoader.pm
line 253.

Does anyone have any idea what I'm doing wrong?

Thanks!
-Shane

 
Reply With Quote
 
 
 
 
Jim Keenan
Guest
Posts: n/a
 
      02-04-2005
philsfan17 wrote:
> I'm having a problem running a perl script that uses mySQL. I have
> installed both DBI and DBD-mysql using ppm, but when I run a script
> that has use mysql in it, I get this error:
>

Please show us your code. Better still, try to present the smallest
possible amount of code that reproduces the error.

jimk
 
Reply With Quote
 
 
 
 
philsfan17
Guest
Posts: n/a
 
      02-04-2005
This is all I'm doing:

#!/bin/perl -w

use mysql;

 
Reply With Quote
 
ioneabu@yahoo.com
Guest
Posts: n/a
 
      02-04-2005

philsfan17 wrote:
> This is all I'm doing:
>
> #!/bin/perl -w
>
> use mysql;


I use DBI all the time, but I do:

use DBI;

I don't know what mysql.pm is. Is it your own module?

wana

 
Reply With Quote
 
A. Sinan Unur
Guest
Posts: n/a
 
      02-04-2005
"philsfan17" <> wrote in news:1107481102.384828.119220
@g14g2000cwa.googlegroups.com:

> This is all I'm doing:
>
> #!/bin/perl -w
>
> use mysql;


First, read <URL: http://tinyurl.com/6z7k2> (thanks Paul!). Then, read

perldoc DBI

Sinan
 
Reply With Quote
 
philsfan17
Guest
Posts: n/a
 
      02-04-2005
Ah, actually I was looking at the code on this page:
http://search.cpan.org/dist/DBD-mysq...OLETE_SOFTWARE

But as the bookmark on the end tells you - I missed a few lines about
the separate mysql module being obsolute at this point.

So I guess I can use DBI to interact with mysql then.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Python and Connecting to MySQL remotely WITHOUT MySQL installedon local computer dave Python 4 11-18-2010 04:19 AM
using mysql client to read a file to create a table in a database in a mysql server julian Ruby 8 04-06-2006 10:29 AM
"mysql.h: No such file or directory" when building MySQL-python francescomoi@europe.com Python 2 05-11-2005 03:12 PM
DBD:mysql doesn't read mysql option file /etc/my.cnf file JL Perl 0 01-28-2005 03:19 AM
"Pure Python" MySQL module like Net::MySQL Ravi Python 6 07-21-2003 06:53 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57