Laravel 5.4 Migration Error

I ran into a problem that I cannot solve. I have an application hosted on my server using Ubuntu 16.04, PHP 7.1, MySQL and NGINX. My application works perfectly. When I ssh to my server and the root of the application, I run the following table: php artisan session: it works successfully.

When I start php artisan migration, I get the following error and the table is not created in my DB.

[Illuminate\Database\QueryException]                                         
  could not find driver (SQL: select * from information_schema.tables where t  
  able_schema = UNIT3D and table_name = migrations)                            

  [PDOException]         
  could not find driver 

Any ideas? I am trying to use this. https://github.com/thomastkim/laravel-online-users

+4
source share
1 answer

I would start by defining installed php modules. This can be done using

php -m

"phpX.Y-mysql", , php . ( X.Y php.

, , , :

sudo apt-cache search php-mysql

:

sudo apt-cache search php-mysql
php-mysql - MySQL module for PHP [default]
php7.0-mysql - MySQL module for PHP
php5.6-mysql - MySQL module for PHP
php-mysqlnd-ms - MySQL replication and load balancing module for PHP
php7.1-mysql - MySQL module for PHP

php- . :

sudo apt-get install php7.1-mysql
+13

Source: https://habr.com/ru/post/1669411/


All Articles