laravel / homestead

MIT License
3.87k stars 1.44k forks source link

Connection to the database is denied everytime restart computer. #1498

Closed hieuhtse05008 closed 4 years ago

hieuhtse05008 commented 4 years ago

Please note that the Homestead issue tracker is reserved for bug reports and enhancements. We are not always able to debug Vagrant, Provider or Operating System issues, but will do our best to help. Thank you!

Versions

Host operating system

Ubuntu 20.04

Homestead.yaml


ip: "192.168.10.10" memory: 4048 cpus: 6 provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:

folders:

sites:

databases:

ports:

- send: 50000

to: 5000

- send: 7777

to: 777

protocol: udp

Vagrant destroy & up output

https://gist.github.com/hieuhtse05008/b0853b33e43c7be897a288b553df9f03

Expected behavior

Connection to mysql database must be normally.

Actual behavior

There is an error happend everytime I try to connect database After vagrant ssh, "mysql -u root -p" command not working with the same error below. Illuminate\Database\QueryException SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost'

mikepage commented 4 years ago

Windows has broken wsl/virtualbox yesterday with an update, reverting this update has solved my issue.

svpernova09 commented 4 years ago

Windows has broken wsl/virtualbox yesterday with an update, reverting this update has solved my issue.

WSL has nothing to do with Vagrant. If you're having an issue w/ WSL tooling please comment in that issue. If you're having another problem, feel free to open a new issue.

svpernova09 commented 4 years ago

@hieuhtse05008

I'm not sure I understand the issue. Your vagrant up looks good. When you reboot the computer while vagrant is running you may need to run vagrant reload or even vagrant up. The services should automatically start. If they don't check the https://laravel.com/docs/8.x/homestead for "Enable / Disable Services"

hieuhtse05008 commented 4 years ago

Windows has broken wsl/virtualbox yesterday with an update, reverting this update has solved my issue.

I'm currently using Ubuntu 20.04, I had this issue from Ubuntu 18.04 ultil now.

hieuhtse05008 commented 4 years ago

@hieuhtse05008

I'm not sure I understand the issue. Your vagrant up looks good. When you reboot the computer while vagrant is running you may need to run vagrant reload or even vagrant up. The services should automatically start. If they don't check the https://laravel.com/docs/8.x/homestead for "Enable / Disable Services"

At first, I think it was a problem about vagrant or laravel/homestead box but it still fails after I reinstall vagrant or my ubuntu.