[Catalyst] install_driver(mysql) failed:

Robyn Jonahs learn.catalyst at gmail.com
Sun Apr 1 18:30:42 GMT 2012


Hi Catalyst List and Experts,

I am having trouble getting catalyst to hook up to my mysql server via
$MyApp script/myapp_create.pl model DB DBIC::Schema MyApp::Schema
create=3Dstatic dbi:mysql:myapp 'tutorial' 'password' '{ AutoCommit =3D> 1 =
}'
as outlined in chapter 10 of the tutorial
https://metacpan.org/module/Catalyst::Manual::Tutorial::10_Appendices#MySQL

I have of course set up a user tutorial, database myapp and use the correct
password. I can log into mysql from the command line with this user.


I made a local install of perl 5.14.2 and installed catalyst there. As far
as I can tell from the tutorial I have all of catalyst and the bits for the
DBIx connection to mysql upgraded to date. I installed DBI, DBD::mysql and
all other modules that are referenced in the error message. The tutorial
and some deviations I made from it work fine until I try to use mysql.

I have
MyApp$ mysql -V
mysql  Ver 14.14 Distrib 5.5.15, for osx10.6 (i386)

The error message comes when I try to call the create model script.

DBIx::Class::Schema::Loader::make_schema_at(): DBI Connection failed:
install_driver(mysql) failed: Can't load
'/FOO/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/darwin-2level/a=
uto/DBD/mysql/mysql.bundle'
for module DBD::mysql:
dlopen(/FOO/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/darwin-2l=
evel/auto/DBD/mysql/mysql.bundle,
1): Library not loaded: libmysqlclient.18.dylib
  Referenced from:
/FOO/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/darwin-2level/au=
to/DBD/mysql/mysql.bundle
  Reason: image not found at
/FOO/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/darwin-2level/DynaLoader.pm
line 194.
 at (eval 429) line 3
Compilation failed in require at (eval 429) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at
/FOO/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/DBIx/Class/Stora=
ge/DBI.pm
line 1249 at
/FOO/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Catalyst/Helper/=
Model/DBIC/Schema.pm
line 635

I have install dependencies set in cpan and have also tried to install
things with cpanm.

I am trying to take what I did in the tutorial and just do the bits in
chapter 10 that update for mysql which just changes the model over and the
schemas after creating the database with the sql file (I checked that, the
tables exist.)

Can anyone help me make sense of the error and move get catlayst to make
the model and talk to mysql? Thank you so much in advance, I have been
picking my limited perl knowledge for a few days now before punting to the
experts.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120401/9e231=
d49/attachment.htm


More information about the Catalyst mailing list