[Catalyst] create.pl Model CDBI CDBI host problem

charlie Bowman cbowmanschool at yahoo.com
Fri Dec 9 22:35:32 CET 2005


I'm using catalyst 5.59
database names,tables,hosts have been changed to
protect the identity of the innocent.

I'm having trouble getting this to work on a system
where the database is on another host.  The helper
scripts run correctly but crashes when I try to start
the supplied server.  Here is the command I use to
create the Model class.  I'm pretty sure it's the
hostname part that's causing the problem.

garbage_create.pl model CDBI CDBI
dbi:mysql:dbname:hostname  user password

The above command creates my classes correctly.  The
problem occurs when I try to start the server.  Here
is my error

Couldn't instantiate component "garbage::Model::CDBI",
"DBD::mysql::st execute failed: You have an error in
your SQL syntax.  Check the manual that corresponds to
your MySQL server version for the right syntax to use
near ':hostname LIKE 'tablename'' at line 1 [for
Statement "SHOW TABLE STATUS FROM dbname:hostname LIKE
'tablename'"] at
/usr/lib/perl5/site_perl/5.8.6/DBIx/ContextualFetch.pm
line 52.
 at /usr/lib/perl5/site_perl/5.8.6/Catalyst.pm line
1445" at
/usr/lib/perl5/site_perl/5.8.6/Module/Pluggable/Fast.pm
line 86
Compilation failed in require at
/shared/home/cmbowma/garbage/script/garbage_server.pl
line 47.
BEGIN failed--compilation aborted at
/shared/home/cmbowma/garbage/script/garbage_server.pl
line 47.

As you can see with the error.  I have a sql syntax
error in "HOW TABLE STATUS FROM dbname:hostname LIKE
'tablename'".  If I remove the :hostname from this
query it works perfect from the comand line.  I'm at a
loss.  Where do I go from here?


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Catalyst mailing list