{"id":1086,"date":"2007-10-15T03:11:59","date_gmt":"2007-10-15T10:11:59","guid":{"rendered":"http:\/\/coalface.mcslp.com\/?p=58"},"modified":"2007-10-15T03:11:59","modified_gmt":"2007-10-15T10:11:59","slug":"mysql-and-dbdmysql-on-mac-os-x","status":"publish","type":"post","link":"https:\/\/planet.mcb.guru\/?p=1086","title":{"rendered":"MySQL and DBD::mysql on Mac OS X"},"content":{"rendered":"<p>I&#8217;ve been investigating some recent issues with installations of MySQL on Mac OS X and the Perl DBD::mysql module for accessing MySQL from within Perl through DBI. <\/p>\n<p>The problem exists only with binary distributions of MySQL and is related to the installation location of the libraries for the MySQL client that DBD::mysql uses. <\/p>\n<p>By default these are installed into <code>\/usr\/local\/mysql\/lib<\/code>, but the dynamic libraries are configured to be located within <code>\/usr\/local\/mysql\/lib\/mysql<\/code>. <\/p>\n<p>It&#8217;s possible for DBD::mysql to build and link correctly, but trying to use the library will fail because it can&#8217;t find the library in the latter directory, even though it linked to the library in the former location. To get round this, the easiest method is to create a link within the directory that points to the parent. For example: <\/p>\n<blockquote><p><code>$ cd \/usr\/local\/mysql\/lib<br \/>\n$ ln -s . mysql<\/code><\/p><\/blockquote>\n<p>That should fix the problem whether you run the commands before the DBD::mysql build or after it. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been investigating some recent issues with installations of MySQL on Mac OS X and the Perl DBD::mysql module for accessing MySQL from within Perl through DBI. <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[36],"_links":{"self":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts\/1086"}],"collection":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1086"}],"version-history":[{"count":0,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts\/1086\/revisions"}],"wp:attachment":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}