DBD::mysql connect dying with "Can't initialize character set latin1"



I just posted this on the perl@mysql mailing list, but there is so little traffic there apparently, I thought I'd post this here too. I hope it is contextually OK.

-----------------------------------------------------------------------------------

Hi,
I have a project where I have multiple mod_perl hosts that need
to connect to a MySQL 5.0.37 instance. The mod_perl app runs on RedHat
7.2, and the MySQL server runs on Solaris 10.

I chose to use a
pre-compiled linux binary package from MySQL, that comes with all
related libraries, header files, etc. I successfully built my
DBD::mysql using the pre-compiled package libraries, but am having
difficulties connecting to the server. I'm seeing the following error
when I try to connect:

Character set 'latin1' is not a
compiled character set and is not specified in the
'/usr/local/mysql/share/mysql/charsets/Index.xml' file
DBI connect('database=blah blah) failed: Can't initialize character set latin1 (path: /usr/local/mysql/share/mysql/charsets/)

I'm
assuming this path is something that is dictated via the pre-built
package I'm using. I have this package on a single development host to
do the linking of DBD::mysql where that path does exist, but not on my
other dev/QA or prod hosts.

I dug around a bit on Google and in the DBI, DBD::mysql and MySQL docs, and came across this:
http://dev.mysql.com/doc/refman/5.0/en/cannot-initialize-character-set.html

I'm
wondering if there is a way that I can tell the DBD::mysql client
library an arbitrary path to those charset files, or if there is a way
to inlcude an arbitrary path or the charset files themselves as part of
the process that generates .so? Am I even barking up the right tree?

I
also have some design constraints in that I cannot install this version
of MySQL on my mod_perl hosts. Operational policy dictates that all
code, libraries, configurations, etc. that I need, must be deployed in
the build as a self-contained entity. I should also mention that the
schema I'm connecting to is all in UTF8.

If anyone has any suggestions, I'd love to hear them. And thanks in advance for any assistance you can offer.

.



Relevant Pages

  • Re: An update is needed Fedora!
    ... The mysql package is probably going to be the hardest one to install ... MySQL version 3 libraries, so when you update to version 4, they will no ...
    (Fedora)
  • Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems
    ... have the old development libraries for mysql 3 installed in some ... the 5.0.45 devel package *is* there. ... me that all libraries in there are from Jul 5th, which is too old to be ... my recent MySQL install. ...
    (php.general)
  • Re: php5-mcrypt in breezy/dapper
    ... but how to usw without the php5-mysqli package? ... MySQL 5.0 works fine with php5-mysql, it's a myth that you need the ... MySQL 5.0 libraries with PHP (it couldn't be used at all when we used ...
    (Ubuntu)
  • Re: [PHP-INSTALL] MySQL connector installation/upgrade problems
    ... I'm trying to upgrade a server running CentOS 3 to an up-to-date MySQL 5 ... installation + PHP4. ... I installed the MySQL 5 package, server and client, ... these versions from or how I can get it to use the newer libraries. ...
    (php.general)
  • Re: How do you know?
    ... esearch, want to install? ... | | emerge. ... had MySQL extensions to be compiled with MySQL support. ...
    (Fedora)