use strict;
use warnings;

# use DBI;
# my $database = "books.db";
# my $database = ":memory:";
# メモリ上のデータベースへ接続
# my $dbh = DBI->connect("dbi:SQLite:dbname=$database");

use DBI;
my $database = "d1";
my $hostname = "localhost";
my $port = "mysql";
my $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";
my $user = "kono";
# my $password = "wtrhr3jk";
my $password = "";
my $dbh = DBI->connect($dsn, $user, $password);

# insert文の実行
$dbh->do("insert into counter (count, author) values (0, 'taro');");

# データベースの切断
$dbh->disconnect;


