{"id":252,"date":"2016-12-20T20:42:33","date_gmt":"2016-12-20T20:42:33","guid":{"rendered":"https:\/\/puvox.software\/?p=252"},"modified":"2021-11-14T13:45:49","modified_gmt":"2021-11-14T13:45:49","slug":"install-mysql-on-perl-dbd","status":"publish","type":"post","link":"https:\/\/puvox.software\/blog\/install-mysql-on-perl-dbd\/","title":{"rendered":"INSTALL Mysql on Perl (DBD)"},"content":{"rendered":"<div class=\"default-content-clss content_252 type_post \"><p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-1235 size-large\" src=\"https:\/\/puvox.software\/wp-content\/uploads\/2016\/12\/perl-mysql-extension-addon-1024x442.png\" alt=\"Perl Mysql tutorial\" width=\"730\" height=\"315\" \/><\/p>\n<p>Many users had problems while trying to install <span style=\"color: #000000;\"><a href=\"https:\/\/www.mysql.com\/\"><strong>MySQL<\/strong><\/a>\u00a0<\/span>module on <span style=\"color: #808080;\"><a style=\"color: #808080;\" href=\"https:\/\/www.perl.org\/\">Perl<\/a> <\/span>(for me, the problem was with 64-bit\u00a0<span style=\"color: #808080;\"><a style=\"color: #808080;\" href=\"https:\/\/www.microsoft.com\/en-us\/windows\">Windows<\/a><\/span>\u00a0).. \u00a0Here I&#8217;ve listed several solutions and one of them might help you.<\/p>\n<p>P.S. Before you continue reading, you might look through the article &#8211;\u00a0<a href=\"https:\/\/puvox.software\/blog\/install-perl-on-wamp-server-localhost\/\">why I preferred StrawberryPerl over ActivePerl<\/a>.<\/p>\n<h2 style=\"text-align: center;\">Step 1:\u00a0 Choose Perl version<\/h2>\n<h3 style=\"color: red;\">A) Using <span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"http:\/\/strawberryperl.com\/\">StrawberryPerl<\/a><\/span>\u00a0(Or similarly for <a href=\"http:\/\/dwimperl.com\/\">DwimPerl<\/a>)<\/h3>\n<p>Using these programs, it is very easy to intall <strong>MySQL<\/strong>, because they contain it (as opposed to ActivePerl, which needs additional installation from Repository).<\/p>\n<ul>\n<li><i>Firstly, you should ensure to change <b><code>perl\\bin\\perl.exe<\/code><\/b> path in your applications to your current \u00a0path, i.e.: <b><code>strawberry\\perl\\bin\\perl.exe<\/code><\/b><\/i><\/li>\n<li>Now, in <strong><code>C:\/Strawberry\/perl\/bin\/<\/code><\/strong>\u00a0open <strong>cpan<\/strong> batch file and after it opens, type: <code><strong>install \"DBD::mysql\"<\/strong><\/code><b>\u00a0(or <code>cpan -fi \"DBD::mysql\"<\/code>) \u00a0<\/b>[p.s. if you are unable to directly open cpan, then open it from CMD]<br \/>\nand it should install without problems (in case you will see some minor errors, that should be a real problem, in overall MYSQL will be installed correctly&#8230;<\/li>\n<li>Restart Local-server after installation.<\/li>\n<\/ul>\n<h3 style=\"color: red;\">B) Using <span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/www.activestate.com\/activeperl\">ACTIVEPERL<\/a><\/span>:<\/h3>\n<p>(If using the latest version and you will fail to install, then you might need the business edition, to use downgrade versions i.e. <a href=\"ftp:\/\/ftp.urc.ac.ru\/pub\/OS\/Windows\/programming\/perl\/\">ActivePerl 5.10<\/a>, because people say, that with older version it might work)<\/p>\n<ul>\n<li>Open <strong><code>PERL\/BIN\/PPM<\/code><\/strong>&#8230; And in the search-bar, search for <b>DBD-mysql<\/b> module&#8230; But you may cant find that, because, by default, ActivePerl doesnt contain &#8220;<strong>DBD-mysql<\/strong>&#8220;(at the moment:2015.04.22), then you need to add them manually. So, if you cant find there, then you might have to add the repositories at first, where <b>DBD-mysql<\/b> will exist.<\/li>\n<\/ul>\n<p style=\"text-align: right;\"><em>(for the paragraph, thanks to \u00a0<a href=\"http:\/\/www.thegeekstuff.com\/2008\/09\/how-to-install-perl-modules-manually-and-using-cpan-command\/\">TheGeekStuff<\/a>\u00a0)<\/em><\/p>\n<h2 style=\"text-align: center;\"><strong>Step 2: Add DBD-MySQL repository manually\u00a0<\/strong><\/h2>\n<p style=\"text-align: center;\">(P.S. Skip this step, if <b>DBD-mysql<\/b> is already in your <strong>PPM<\/strong> list.)<\/p>\n<p>You can do this step within \u00a0PPM GUI too: <strong>Options&gt;Repositories<\/strong>, but it could be better from command line.<br \/>\nTry one of these commands (change &#8220;ZZZZ&#8221; symbols to your version, for example, there should be written: <strong>14<\/strong>xx or <strong>20<\/strong>xx)<br \/>\n<b><code>ppm repo add Trouchelle1 http:\/\/trouchelle.com\/ppm\/package.lst<\/code><\/b><br \/>\nor<br \/>\n<b><code>ppm repo add Bribes1 http:\/\/www.bribes.org\/perl\/ppm\/package.lst<\/code><\/b><br \/>\nor<br \/>\n<b><code>ppm repo add Theoryx1 http:\/\/cpan.uwinnipeg.ca\/PPMPackages\/<span style=\"color: #ff0000;\">ZZxx<\/span>\/<\/code><\/b><br \/>\nor<br \/>\n<b><code>ppm repo add Theoryx2 http:\/\/theoryx5.uwinnipeg.ca\/ppms\/package.lst<\/code><\/b><\/p>\n<p>(For old version of Perl, : <a href=\"http:\/\/www.powershelladmin.com\/wiki\/University_of_Winnipeg%27s_Theoryx_ppm_repository_for_ActivePerl\">see this codes<\/a> )<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"text-align: center;\"><strong>Step 3: Installing Package<\/strong><\/h2>\n<p>-open <strong><code>PERL\\BIN\\PPM.bat<\/code><\/strong> and type: <code><b>cpan<\/b><\/code>\u00a0(or open directly <code><b>PERL\\BIN\\CPAN.bat<\/b><\/code> if available)<br \/>\n-Then inside the terminal, type:<br \/>\n<b><code>install \"DBD::mysql\"<\/code><\/b><\/p>\n<p>That should be enough!<\/p>\n<p style=\"text-align: center;\"><span style=\"font-size: 18pt;\"><strong>(In case of problems)<\/strong><\/span><\/p>\n<p style=\"text-align: left;\">For some people, this <code><strong>DBD::mysql<\/strong><\/code>\u00a0module may show some errors during installation (maybe incorrect mysql version is installed\/updated&#8230; I dont know).<br \/>\nThen type any of these command:<br \/>\n<b><code>ppm install DBD-mysql<\/code><\/b><br \/>\nOR<br \/>\n<b><code>ppm install DBD::mysql<\/code><\/b><br \/>\nOR<br \/>\n<b><code>cpan -fi DBD::mysql<\/code><\/b><br \/>\nOR<br \/>\n<b><code>cpan DBD::mysql<\/code><\/b><\/p>\n<p style=\"text-align: left;\"><span style=\"color: #99ccff;\"><em>p.s. most packages exist here too, but check your PC\/Perl versions:<\/em><\/span><br \/>\n<span style=\"color: #99ccff;\"><em>\u00a0http:\/\/www.bribes.org\/perl\/ppm\/<\/em><\/span><br \/>\n<span style=\"color: #99ccff;\"><em>\u00a0http:\/\/search.cpan.org\/~capttofu\/DBD-mysql-4.031\/lib\/DBD\/mysql\/INSTALL.pod<br \/>\n(on the right side, click download)<\/em><\/span><br \/>\n<span style=\"color: #99ccff;\"><em> Then, if you can find in internet, a correct .ppd file of DBD-mysql, you can install it directly:<\/em><\/span><br \/>\n<span style=\"color: #99ccff;\"><em> ppm install http:\/\/theoryx5.uwinnipeg.ca\/ppmpackages\/package.ppd<\/em><\/span><\/p>\n<p>If the above methods wont help, this may help too:<br \/>\n&#8211; Install Modes manually(and click &#8220;NEXT PAGE&#8221; to see download packages..)<br \/>\n&#8211; <a href=\"https:\/\/www.bugzilla.org\/docs\/2.22\/html\/modules-manual-instructions.html\">https:\/\/www.bugzilla.org\/docs\/2.22\/html\/modules-manual-instructions.html<\/a> )<br \/>\n&#8211; <a href=\"http:\/\/forums.movabletype.org\/2009\/03\/installation-problem-with-dbdmysql.html\">http:\/\/forums.movabletype.org\/2009\/03\/installation-problem-with-dbdmysql.html<\/a><br \/>\n&#8211; <a href=\"http:\/\/lists.mysql.com\/perl\/4304\">http:\/\/lists.mysql.com\/perl\/4304<\/a><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<div class=\"default-content-clss excerpt_252 type_post \"><p>Many users had problems while trying to install MySQL\u00a0module on Perl (for me, the problem was with 64-bit\u00a0Windows\u00a0).. \u00a0Here I&#8217;ve listed several solutions and one of them might help you.<a class=\"excerpt-read-more\" href=\"https:\/\/puvox.software\/blog\/install-mysql-on-perl-dbd\/\">(Continue Reading)<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":1235,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[13],"tags":[],"class_list":["post-252","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-website"],"_links":{"self":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/posts\/252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/comments?post=252"}],"version-history":[{"count":0,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/posts\/252\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/media\/1235"}],"wp:attachment":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/media?parent=252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/categories?post=252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/tags?post=252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}