【发布时间】:2021-03-28 10:19:05
【问题描述】:
我在全球范围内使用宅基地,当我尝试将我的数据库详细信息添加到 datagrip 时出现此错误
指定的数据库用户/密码组合被拒绝:[28000] FATAL: no pg_hba.conf entry for host "192.168.10.1", user "homestead", database "dogs", SSL on
这是我的 Homestead.yaml 文件
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/projects/code
to: /home/vagrant/code
sites:
- map: site1.test
to: /home/vagrant/code/site1/public
- map: site2.test
to: /home/vagrant/code/site2/public
- map: site3.test
to: /home/vagrant/code/site3/public
php: "7.4"
- map: dogs.test
to: /home/vagrant/code/dogs/public
php: "7.4"
databases:
- site1
- site2
- site3
- dogs
features:
- mysql: true
- mariadb: false
- postgresql: true
- ohmyzsh: false
- webdriver: false
#services:
# - enabled:
# - "postgresql@12-main"
# - disabled:
# - "postgresql@11-main"
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
当我尝试连接时,我的 datagrip 中有什么
Host: 192.168.10.10
Port: 5432
Authentication: User & Password
User: homestead
Password: secret
Database: dogs
【问题讨论】:
-
为什么不使用默认转发端口? laravel.com/docs/8.x/homestead#ports 尝试连接到 localhost:33060 它应该隧道到虚拟机的 mysql 实例
-
为什么在连接 192.168.10.10 时出现错误是关于主机 192.168.10.1 的?