Connect to a Vagrant Box's DB using Sequel Pro. - euggrie/euggrie.github.io GitHub Wiki

sequel_pro_config

  • MySQL Host is always 127.0.1.1 (our MacOS port to connect to the DB)
  • Username and password, I got it from: config/database.yml and used the development db info.
  • Database and port, leave empty.
  • SSH Host is the ssh port in our vagrant box, this can be found by connecting to the box via ssh: vagrant ssh And then entering hostname -I and it’s the second number.
  • SSH User is the vagrant box user, usually vagrant
  • SSH Key is generated when we do vagrant up and located in the directory shown (it’s a hidden folder in Home)
  • SSH Port can be left empty.
  • Remember to save! And test before connecting. If it asks for a password for [email protected] it’s vagrant

Enjoy!

**Edit: If we build our VM from scratch again we need to clear the cashed ssh key otherwise sequel would show an error when trying to connect. To do this run command: ssh-keygen -R 172.28.128.3 Or we can removed that entry from known_hosts too.