Just went through all the steps listed on the Laravel site to install and get up and running for MacOS HighSierra. I currently have Composer, Homebrew, valet, PHP 7.2.8, MySQL version 8.0.11 and Laravel 5.6.28 installed. I can create a new project by doing the Laravel new blog
command and not have any problems. Also when I go to my browser I can see current project I just created or am working on. I can run the valet list
command and so I know its running/working. I also can create a migration and have it show up in my project as well by running the php artisan make:migration test_test_test
.
My PATH
also has ~/.composer/vendor/bin
in it as well.
my .env file look like such
APP_NAME=Laravel
APP_ENV=local
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=blog
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
I run the php artisan migrate -vvv
command and it runs and stalls/hangs up with no output. I have to ctl-c to get out of it. tried the -v /-vv
as well, did the same thing.
I created a database named blog
and even add a table test
manually to make sure that the database was working/running.
Update
Went ahead and uninstall MySQL and reinstall it. I was able to get the php artisan migrate -v command to run and am getting this error.
now I'm getting this error.
MacBook-Pro:anything computername$ php artisan migrate -v
PDOException : SQLSTATE[HY000] [2006] MySQL server has gone away
at /Users/computername/Sites/anything/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68
64| if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
65| return new PDOConnection($dsn, $username, $password, $options);
66| }
67|
> 68| return new PDO($dsn, $username, $password, $options);
69| }
70|
71| /**
72| * Determine if the connection is persistent.
Exception trace:
Created a router and view that connects to a table that I creates to see if I would be able to access the database variables and print them out. On return I got this error.
Exception message: PDO::__construct(): Unexpected server respose while doing caching_sha2 auth: 109
create_users_table.php
andcreate_password_resets_table.php
– Strawserart migrate --verbose
and edit question with the output. What doesphp --version
output, did you rancomposer install
with no errors? What is your MySQL version? (mysql --version
). – GreyDB::select('SHOW TABLES');
in artisan's tinker just to see if you get a response from the database. – MearaAPP_DEBUG
set totrue
in your.env
? – Subphylumphp artisan migrate
command. – PeruAPP_DEBUG
is set totrue
in the.env
file @JithinJose I'm not using any container/VM unless Homebrew is considered one. – Strawser./storage/logs/laravel.log
? – Subphylumwhich php
tell you? – Seneca/usr/local/bin/php
– Strawserphp artisan list
or anything? – Senecaartisan list
command it shows me the whole list. – Strawsermysql > ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'add your password here';
. Seeing this is the classic test / dev setup, usingroot
/root
for MySQL user isn't uncommon. Try doing that, add the new password to.env
and report back if it worked :) – Clair