0

I try to do php artisan migrate and the error is

In Connection.php line 664:

could not find driver (SQL: select * from information_schema.tables where t able_schema = stock_management and table_name = migrations)

In Connector.php line 67:

could not find driver

Connection.php line 664

try {
            $result = $callback($query, $bindings);
        }

        // If an exception occurs when attempting to run a query, we'll format the error
        // message to include the bindings with SQL, which will make this exception a
        // lot more helpful to the developer instead of just the database's errors.
        catch (Exception $e) {
-->line 664        throw new QueryException( 
                $query, $this->prepareBindings($bindings), $e
            );
        }

Connector.php line 67

protected function createPdoConnection($dsn, $username, $password, $options)
    {
        if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
            return new PDOConnection($dsn, $username, $password, $options);
        }

--> line 67    return new PDO($dsn, $username, $password, $options);
    }
  • pdo or pdo_mysql isn't installed on your system. Are you using Docker? Or something else? Try to find a way to install php_pdo and php_mysql on your system – UnderDog Jan 06 '23 at 13:18
  • @UnderDog i open php.ini by clicking config button on xampp panel and already have extension=pdo_mysql without semicolon in front. – Hanif Nawawi Jan 06 '23 at 13:38
  • Check the answer here ... [Artisan migrate could not find driver](https://stackoverflow.com/questions/46745365/artisan-migrate-could-not-find-driver) – Mohamed Jasim Jan 07 '23 at 09:01

0 Answers0