SQLSTATE[HY000] [2002] 无效参数 (SQL: select * 来自 information_sch ema.tables 其中 table_schema = mamaput 和 table_name = 迁移)

SQLSTATE[HY000] [2002] Invalid argument (SQL: select * from information_sch ema.tables where table_schema = mamaput and table_name = migrations)

我在我的虚拟专用服务器上设置了我的应用程序,但在设置我的配置文件后我收到了这个错误

(2/2) QueryException
SQLSTATE[HY000] [2002] Invalid argument (SQL: select * from `categories` where 
`vendor_id` is null).

这是我的 .env 文件

APP_NAME=Mamaput
APP_ENV=production
APP_KEY=base64:oJ7frlsRiP5V5QuFKTwVgpoBkUDze6mZZLwawqgayHk=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://mama-put.com

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=mamaput
DB_USERNAME=root
DB_PASSWORD=B0j0p@l3

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync

我已经很沮丧了,因为一切似乎都还好。我做错了什么?

通常意味着你需要指定TCP/IP(1),或者告诉MySQL你的Unix套接字在哪里(2):

将本地主机更改为 127.0.0.1 要么 "mysql:host=127.0.0.1" 或 "mysql:host=localhost;port=3306" "mysql:unix_socket=/var/run/mysqld/mysqld.sock"