could not find driver

could not find driver

miguelm93miguelm93 Posts: 2Questions: 1Answers: 0

What is the problem?

this is my config.php

$sql_details = array(
"type" => "Mysql", // Database type: "Mysql", "Postgres", "Sqlserver", "Sqlite" or "Oracle"
"user" => "root", // Database user name
"pass" => "mypass", // Database password
"host" => "localhost", // Database host
"port" => "", // Database connection port (can be left empty for default)
"db" => "data", // Database name
"dsn" => "", // PHP DSN extra information. Set as charset=utf8mb4 if you are using MySQL
"pdoAttr" => array() // PHP PDO attributes array. See the PHP documentation for all options
);

Answers

  • colincolin Posts: 15,146Questions: 1Answers: 2,586

    Hi @miguelm93 ,

    The error is suggesting there isn't a driver for MySQL on the server. Is MySQL installed correctly and up and running.

    Cheers,

    Colin

  • miguelm93miguelm93 Posts: 2Questions: 1Answers: 0

    Same problem on my home pc, same problem on my office pc, whats the problem? i have Appserver with PHP7.. Mysql run normally..

  • allanallan Posts: 61,734Questions: 1Answers: 10,111 Site admin

    Create a new file called info.php and put into it <?php phpinfo(); ?> then load it in your browser. It will show detailed information about your PHP install (so delete it once you've finished with it!).

    When loaded, scroll down to the "PDO" section. It will state what PDO drivers have been installed. It sounds like the MySQL PDO driver isn't available. The phpinfo will be able to confirm that.

    Allan

This discussion has been closed.