Embedded mysql with DBD::mysql

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I wonder whether you can help me.

I am trying to use embedded mysql with perl (under cygwin).

I build mysql (5.0.51b) using the following options:
./configure --without-server --with-embedded-server

This seems to have worked, because I can build the test1_libmysqld
embedded server example from the MySQL website.

To install DBD::mysql, I downloaded DBI-1.605 and DBD-mysql-4.007 from CPAN.

In the DBD::mysql directory, I then ran

perl Makefile.PL --force-embedded
make install

Now, I cannot see whether the embedded code has worked.

I tried

perl -e 'use DBI; $dbh =

but this only prints the following output:


failed: Can't connect to local MySQL server through socket '/tmp/m
ysql.sock' (2) at -e line 1

How can I tell whether the embedded mysql server has been installed with

Can you give a simple example for how to open a database using the
embedded server?

Many thanks,


Site Timeline