简体   繁体   中英

Laravel Homestead Cannot Connect to MySQL from host

I saw many threads on forums and Stackoverflow about this issue but none were addressing in a way that worked for me.

I used the following credential on my host computer (using Sequel Pro) to log in homestead MySQL as documented:

host: 127.0.0.1
username: homestead
password: secret

It says that " Unable to connect to host 127.0.0.1, or the request timed out ".

I then tried to log using ssh:

MySQL host: 10.0.2.15
Username: homestead
Password: secret
Port: 3306

SSH host: 192.168.10.10
SSH user: vagrant
SSH Password: ~/.ssh/id_rsa

I got " Connection failed: Your password has expired. To log in you must change it using a client that supports expired passwords. "

I then followed this to change my password.

homestead ssh
mysql -uhomestead -psecret
SET PASSWORD = PASSWORD('secret');

That fixed my problem as I was now able to connect from ssh as described above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM