DBタイプも含める必要があるため、MySQLの場合は、次のように変更する必要があります $dsn = "mysql://$db_user:example@sqldat.com$db_host/$db_name";