<?php #connect.php connect to the mysql server define('DB_HOST','localhost'); define('DB_PORT', '3306'); define('DB_NAME', 'cookbook'); define('DB_USERNAME', 'root'); define('DB_PASSWORD', ''); try{ $dns = 'mysql:host='.DB_HOST.';port='.DB_PORT.';dbname=' . DB_NAME; $pdo = new PDO($dns , DB_USERNAME, DB_PASSWORD); $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE,PDO::FETCH_ASSOC); $pdo->exec('set session sql_mode = traditional'); $pdo->exec('set session innodb_strict_mode = on'); $stmt = $pdo->prepare('select * from firstNmae'); $stmt->execute(); $resute = $stmt->fetchAll(); echo'<pre>'; print_r($resute); echo '</pre>'; } catch(PDOException $e){ die(htmlspecialchars($e->getMessage())); } And when tryprint_r(PDO::getAvailableDrivers()); it returns this result Array ( [0] => sqlite )