Veritabanı bağlantısı böyle olacak;

try {
     $db = new PDO("mysql:host=localhost;dbname=veritabaniadi;charset=utf8", "kullaniciadi", "sifre");
} catch ( PDOException $e ){
     print $e->getMessage();
}