如何使用laravel连接mysql数据库
我正在尝试连接Laravel中的MySQL数据库,有一些问题 这是Laravel中.env文件中的MySQL凭据如何使用laravel连接mysql数据库,mysql,laravel,Mysql,Laravel,我正在尝试连接Laravel中的MySQL数据库,有一些问题 这是Laravel中.env文件中的MySQL凭据 DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=welcome DB_USERNAME=krishna DB_PASSWORD=Krish_123 我正在尝试迁移,它显示了一些错误,如bellow siva@siva-Latitude-3490:~/Desktop/laravel-practies-pro
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=welcome
DB_USERNAME=krishna
DB_PASSWORD=Krish_123
我正在尝试迁移,它显示了一些错误,如bellow
siva@siva-Latitude-3490:~/Desktop/laravel-practies-project$ php artisan migrate
Illuminate\Database\QueryException
could not find driver (SQL: select * from information_schema.tables where table_schema = welcome and table_name = migrations and table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
667| // If an exception occurs when attempting to run a query, we'll format the error
668| // message to include the bindings with SQL, which will make this exception a
669| // lot more helpful to the developer instead of just the database's errors.
670| catch (Exception $e) {
> 671| throw new QueryException(
672| $query, $this->prepareBindings($bindings), $e
673| );
674| }
675|
+34 vendor frames
35 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
信息不足,这是本地开发还是部署生产问题?您在什么操作系统上使用什么堆栈?这是本地开发。我用乌本图德回答你的问题?可能重复: