Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Perl & Mysql

0 views
Skip to first unread message

Joe Echavarria

unread,
Dec 5, 2003, 4:41:51 PM12/5/03
to begi...@perl.org
Hi there,

Which modules i have to install in order to connect
perl with mysql ?, in what order ?, My perl
installation is on solaris 9. I already have mysql
installed. Thanks for the help.

Joe Echavarría.

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

Dan Muey

unread,
Dec 5, 2003, 4:52:18 PM12/5/03
to Joe Echavarria, begi...@perl.org
> Hi there,
>

Howdy,

> Which modules i have to install in order to connect
> perl with mysql ?, in what order ?, My perl

Excellent choice of combo! You'll want to install DBI
It should come witht the mysql driver automatically.

> installation is on solaris 9. I already have mysql
> installed. Thanks for the help.

HTH

DMuey

Bryan Harris

unread,
Dec 6, 2003, 10:25:40 AM12/6/03
to Beginners Perl

> Which modules i have to install in order to connect
> perl with mysql ?, in what order ?, My perl
> installation is on solaris 9. I already have mysql
> installed. Thanks for the help.

Here's what I wrote up while installing under OS X, should be pretty
similar:

> To install perl support for MySQL:
>
> - Make sure you have the OS X developer tools installed
>
> - Go to <http://www.cpan.org/modules/by-module/DBI/> and download the latest
> released DBI (1.38 as of this writing). Read the associated readme for
> installation instructions.
>
> - Then go to <http://www.cpan.org/modules/by-module/DBD/> and download a mysql
> version of the DBD that looks good (mysql-2.1028 as of this writing). Try the
> instructions, but if they don't work, you may need to fix the Makefile (likely
> necessary for OS X 10.3). To do this:
>
> % perl Makefile.PL --testdb=test --testuser=testuser --testpassword=testuser
> --testhost=localhost --cflags=-I/usr/local/mysql/include/
> --libs="-L/usr/local/mysql/lib -lmysqlclient -lz"
> % perl -pi -e's/MACOSX/env MACOSX/' Makefile
> (or replace -r MACOSX 'env MACOSX' Makefile)
> % make
> % make test
> % sudo make install
>
> Now remove both source directories and you're all set!

- B

Randal L. Schwartz

unread,
Dec 6, 2003, 5:35:32 PM12/6/03
to begi...@perl.org
>>>>> "Dan" == Dan Muey <dm...@infiniplex.com> writes:

>> Which modules i have to install in order to connect
>> perl with mysql ?, in what order ?, My perl

Dan> Excellent choice of combo!

I disagree. The only reason to choose MySQL over PostgreSQL these
days is compatibility with an existing bolt-on (or your brain :).

Get PostgreSQL. Get a real database.

Dan> You'll want to install DBI
Dan> It should come witht the mysql driver automatically.

No, it doesn't. Go to the CPAN shell, and ask for both DBI and DBD::mysql.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Wiggins D'Anconia

unread,
Dec 6, 2003, 5:49:51 PM12/6/03
to Randal L. Schwartz, begi...@perl.org
Randal L. Schwartz wrote:

>>>>>>"Dan" == Dan Muey <dm...@infiniplex.com> writes:
>
>
>>>Which modules i have to install in order to connect
>>>perl with mysql ?, in what order ?, My perl
>
>
> Dan> Excellent choice of combo!
>
> I disagree. The only reason to choose MySQL over PostgreSQL these
> days is compatibility with an existing bolt-on (or your brain :).
>
> Get PostgreSQL. Get a real database.
>

But what are the reasons for choosing PostgreSQL over MySQL? What's a
"real" database? Without providing reasons this is just FUD. I will
agree that if you are looking for a package closer to a "real database"
you will need to look past MySQL 3.x to the 4.x series.

Regardless the OP should analyze the DB chosen based on their own needs.
Having a discussion about what makes a good DB is probably OT for this
group, so suggesting that a choice already made is inadequate is as much OT.

http://danconia.org

Randal L. Schwartz

unread,
Dec 6, 2003, 10:29:47 PM12/6/03
to begi...@perl.org
>>>>> "Wiggins" == Wiggins D'Anconia <wig...@danconia.org> writes:

Wiggins> But what are the reasons for choosing PostgreSQL over MySQL? What's a
Wiggins> "real" database? Without providing reasons this is just FUD. I will
Wiggins> agree that if you are looking for a package closer to a "real
Wiggins> database" you will need to look past MySQL 3.x to the 4.x series.

But if you don't want to wait the next five years for MySQL to catch
up to where PostgreSQL is now, you might as well install PostgreSQL.

Don't quote the old "MySQL is faster" FUD, because that's not valid.
For example, SourceForge picked Pg over My based on *performance* as
one of the key factors, and the choice is well documented (see
<http://www.phpbuilder.com/columns/tim20000705.php3?page=1&print_mode=1>).

In every category, Pg is technically superior to My. The only way
My now wins is inertia or bolt-on compatibility with legacy apps
and legacy brains.

Wiggins> Regardless the OP should analyze the DB chosen based on their own
Wiggins> needs. Having a discussion about what makes a good DB is probably OT
Wiggins> for this group, so suggesting that a choice already made is inadequate
Wiggins> is as much OT.

I didn't see anything that insisted on MySQL. I was just trying to steer
the OP toward a better choice to keep the knowledge entropy to a minimum,
and remove the chance for "one more legacy brain that will need rewiring".

Wiggins D'Anconia

unread,
Dec 7, 2003, 10:57:49 AM12/7/03
to begi...@perl.org
Randal L. Schwartz wrote:
>>>>>>"Wiggins" == Wiggins D'Anconia <wig...@danconia.org> writes:
>
>
> Wiggins> But what are the reasons for choosing PostgreSQL over MySQL? What's a
> Wiggins> "real" database? Without providing reasons this is just FUD. I will
> Wiggins> agree that if you are looking for a package closer to a "real
> Wiggins> database" you will need to look past MySQL 3.x to the 4.x series.
>
> But if you don't want to wait the next five years for MySQL to catch
> up to where PostgreSQL is now, you might as well install PostgreSQL.
>
> Don't quote the old "MySQL is faster" FUD, because that's not valid.
> For example, SourceForge picked Pg over My based on *performance* as
> one of the key factors, and the choice is well documented (see
> <http://www.phpbuilder.com/columns/tim20000705.php3?page=1&print_mode=1>).
>
> In every category, Pg is technically superior to My. The only way
> My now wins is inertia or bolt-on compatibility with legacy apps
> and legacy brains.

What categories are those though? That was my point, no one quoted
performance, no one has quoted any reason, that is the problem with the
discussion so far. There are at least two categories MySQL is better, it
is shorter to type without abbreviation, and comes first in the
alphabet. Worthy reasons? Doubtful, but to blindly say Pg is better
hands down and then not to give any reason doesn't instill much faith in
your opinion.

MySQL is open source, fast, easy to install, secure as far as I know,
has a relatively full implementation of SQL standards with some nice
extra language functions if cross-db SQL isn't needed, good
documentation, commercial support if desired, a nice looking web page,
internetworking ability, a DBI driver, transactions (now), multiple
platform support, etc. Granted, all of which Pg has as well, but just
having the same things doesn't make one product superior. So why?

>
> Wiggins> Regardless the OP should analyze the DB chosen based on their own
> Wiggins> needs. Having a discussion about what makes a good DB is probably OT
> Wiggins> for this group, so suggesting that a choice already made is inadequate
> Wiggins> is as much OT.
>
> I didn't see anything that insisted on MySQL. I was just trying to steer
> the OP toward a better choice to keep the knowledge entropy to a minimum,
> and remove the chance for "one more legacy brain that will need rewiring".
>

Tell us why this is a legacy brain? ...

Vim is better than emacs,
PHP is better than Perl,
Red Hat is better than Suse,
Gentoo is better than Debian,
Gnome is better than KDE,
Linux is better than Windows,
Java is better than C++,
MySQL is better than PgSQL

I have heard these discussions before, no one ever seems to win....

http://danconia.org

Robert

unread,
Dec 7, 2003, 5:29:29 PM12/7/03
to begi...@perl.org
Randal L. Schwartz wrote:

>>>>>>"Wiggins" == Wiggins D'Anconia <wig...@danconia.org> writes:
>
>
> Wiggins> But what are the reasons for choosing PostgreSQL over MySQL? What's a
> Wiggins> "real" database? Without providing reasons this is just FUD. I will
> Wiggins> agree that if you are looking for a package closer to a "real
> Wiggins> database" you will need to look past MySQL 3.x to the 4.x series.
>
> But if you don't want to wait the next five years for MySQL to catch
> up to where PostgreSQL is now, you might as well install PostgreSQL.
>
> Don't quote the old "MySQL is faster" FUD, because that's not valid.
> For example, SourceForge picked Pg over My based on *performance* as
> one of the key factors, and the choice is well documented (see
> <http://www.phpbuilder.com/columns/tim20000705.php3?page=1&print_mode=1>).
>
> In every category, Pg is technically superior to My. The only way
> My now wins is inertia or bolt-on compatibility with legacy apps
> and legacy brains.
>
> Wiggins> Regardless the OP should analyze the DB chosen based on their own
> Wiggins> needs. Having a discussion about what makes a good DB is probably OT
> Wiggins> for this group, so suggesting that a choice already made is inadequate
> Wiggins> is as much OT.
>
> I didn't see anything that insisted on MySQL. I was just trying to steer
> the OP toward a better choice to keep the knowledge entropy to a minimum,
> and remove the chance for "one more legacy brain that will need rewiring".
>

If you are on Windows, MySQL is the better choice. Unless, of course,
you want to mess with cygwin. Ick. Although when PG goes native Windows,
I'll be using it. : )

Robert

unread,
Dec 7, 2003, 5:30:57 PM12/7/03
to begi...@perl.org
Wiggins D'Anconia wrote:
> Vim is better than emacs,
> PHP is better than Perl,
> Red Hat is better than Suse,
> Gentoo is better than Debian,
> Gnome is better than KDE,
> Linux is better than Windows,
> Java is better than C++,
> MySQL is better than PgSQL
>
> I have heard these discussions before, no one ever seems to win....

Exactly...

0 new messages