JnTng
1 month ago
224
7
Laravel

Homestead Database\QueryException

Posted 1 month ago by JnTng

I use Homestead and my .env setting is base on Laravel document suggestion

(To connect to your MySQL or Postgres database from your main machine via Navicat or Sequel Pro, you should connect to 127.0.0.1 and port 33060 (MySQL) or 54320 (Postgres). The username and password for both databases is homestead / secret.)

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=33060
DB_DATABASE=laravel-shopping
DB_USERNAME=homestead
DB_PASSWORD=secret

However I got this error when I run migrate:install

   Illuminate\Database\QueryException  : SQLSTATE[HY000] [2002] No such file or directory (SQL: create table `migrations` (`id` int unsigned not null auto_increment primary key, `migration` varchar(191) not null, `batch` int not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

I've spent hours on it, help me plz.

Please sign in or create an account to participate in this conversation.