Closed Michi441 closed 6 years ago
Ask this kind of questions in a forum like Laracasts.
@Prometheus88 did you find any solution?
@siddharthghedia Yes. I simply installed mysql@5.7 with homebrew. I also removed all other mysql versions on my mac. Make sure, if you are using homebrew, that only mysql@5.7 is running. You can see all your services via brew services list. I think disabling other mysql versions will be fine, but i went for a clean setup and deleted all versions before installing a fresh installation with 5.7
@Prometheus88 I'm still receiving this error: SQLSTATE[HY000] [2006] MySQL server has gone away
would you mind helping me with this?
@siddharthghedia, i would love to, but i have honestly not too much knowledge about MySQL. I found this https://stackoverflow.com/questions/35036547/mysql-server-has-gone-away-error-during-installing-migration-laravel on stackoverflow. Maybe this will/can help? Otherwise try to ask on stackoverflow might be the best bet!
Hope you can fix it asap! Greetings!
Description:
After reading & trying all kinds of different solutions, i can't connect my application to my database via 'php artisan migrate'. No matter what i do, i always get the error:
SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = blog and table_name = migrations)
My .env file:
Saw that i need to change inside database.php the mysql configuration, which i did:
Some suggested to use in .env the ip adress 127.0.0.1 instead of localhost, still same result.
Sequel Pro was also unable to connect, but then i read that i have to add all privileges to the current user (root), which i did. Since then, i can connect via Sequel Pro to Mysql, however, Laravel always gives back the error shown before.
Here's the full error log when running php artisan migrate:
Please use the argument -v to see more details.
Steps To Reproduce:
laravel new 'name'
brew services start mysql
mysql -uroot
mysql use blog;
change .env file with database name, username, password
php artisan migrate