Documentation Home
MySQL 5.6 リファレンスマニュアル
Download this Manual
PDF (US Ltr) - 26.8Mb
PDF (A4) - 26.9Mb
HTML Download (TGZ) - 7.1Mb
HTML Download (Zip) - 7.2Mb

MySQL 5.6 リファレンスマニュアル  /  ...  /  Windows に ActiveState Perl をインストールする

2.13.2 Windows に ActiveState Perl をインストールする

Windows 上で、MySQL DBD モジュールを ActiveState Perl でインストールするには次の手順に従います。

  1. から ActiveState Perl を入手してインストールします。

  2. コンソールウィンドウを開きます。

  3. 必要に応じて HTTP_proxy 変数を設定します。たとえば、次のような設定を試してみます。

    C:\> set
  4. PPM プログラムを起動します。

    C:\> C:\perl\bin\
  5. まだ DBI をインストールしていない場合は、インストールします。

    ppm> install DBI
  6. これが成功したら、次のコマンドを実行します。

    ppm> install DBD-mysql

この手順は ActiveState Perl 5.6 以降で機能するはずです。

手順が機能しない場合は、代わりに ODBC ドライバをインストールして ODBC から MySQL サーバーに接続するようにしてください。

use DBI;
$dbh= DBI->connect("DBI:ODBC:$dsn",$user,$password) ||
  die "Got error $DBI::errstr when connecting to $dsn\n";

User Comments
  Posted by Janet Eivers on November 8, 2007
Here's my take, hope it's useful to somebody - I'm really new to developing but wanted to try out perl with MySQl. I already had a WAMP package installed so found my way to this page via google (after trying the page that lists DBI and DBD-MySQL, all of which i found really confusing:)
On this page I followed this link and downloaded the free standard version. Needless to say it was a zipped file which i unzipped to a new folder I created on my C: drive.
In that folder was a file called Installer.bat. I double clicked the file and the package installed via the command prompt window (got asked a series of questions:), nevertheless it installed - phew!!
I then followed Nish's instructions to check the version and change directories and execute the command:
a lovely GUI opened! and I was able to see what packages were installed and what were not. DBI was already installed (no work for me there) DBD-MySQl was not so I simply highlighted the package I wanted to install and the ppm downloaded the file for me. All that was left to do was to use the icon in the ppm (marked 'run') and - hey presto - DBD MySQL was installed for me - genius - :)

Now I can start figuring where is the best place to learn how to write perl code to work with MySQL and trying it out on my machine.
This worked on windows xp with sp2
  Posted by Chris Calender on October 3, 2011
If the above doesn't work, as did not for me with ActivePerl 5.12.4, then try these 2 commands:

ppm rep add
ppm install dbd-mysql

For reference, you can read the full tutorial/walk-through here:
Sign Up Login You must be logged in to post a comment.