I'm trying to learn MySQL but I can't even do basic stuff like migrate and it's becoming super frustrating.
So I made a database, a model and a migration and now I'm trying to migrate the table with php artisan migrate.
But that's where I get this error:
PDOException : SQLSTATE[HY000] [2006] MySQL server has gone away
at /Users/marijn/Desktop/code/laravel-6-beginner/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
66| if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
67| return new PDOConnection($dsn, $username, $password, $options);
68| }
69|
> 70| return new PDO($dsn, $username, $password, $options);
71| }
72|
73| /**
74| * Determine if the connection is persistent.
Exception trace:
1 PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=laravel", "root", "secret", [])
/Users/marijn/Desktop/code/laravel-6-beginner/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
2 Illuminate\Database\Connectors\Connector::createPdoConnection("mysql:host=127.0.0.1;port=3306;dbname=laravel", "root", "secret", [])
/Users/marijn/Desktop/code/laravel-6-beginner/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:100
Please use the argument -v to see more details.
Why am I getting this error and how and I fix it?