Embedded mysql with DBD::mysql

Embedded mysql with DBD::mysql

am 30.07.2008 16:12:18 von Chris Rodgers

Hi,

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
make install

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

I tried

perl -e 'use DBI; $dbh =
DBI->connect("DBI:mysql:database=test;mysql_embedded=1;mysql _embedded_options=--help,--verbose","a","b");'

but this only prints the following output:

DBI
connect('database=test;mysql_embedded=1;mysql_embedded_optio ns=--help,--verbose','a',...)
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
DBD::mysql?

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

Many thanks,

Chris.

--
Dr Chris Rodgers MChem DPhil

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org