How to connect to vagrant mysql database with Sequel Pro - mysql

How do I connect to vagrant mysql database with Sequel Pro? Specifically, ScotchBox 3?

An easy option is to connect via Sequel Pro's SSH option:
MySQL Host: 192.168.33.10 (or your vagrant IP address, if different)
Username: root (or your custom mysql username)
Password: root (or your custom mysql password)
SSH Host: 192.168.33.10 (or your vagrant IP address, if different)
SSH User: vagrant
SSH Password: vagrant

Related

Why can I connect to mysql through ssh -> mysql, but cannot connect through a ssh tunnel, address is bound to localhost(bind-address 127.0.0.1)?

I can connect to the server by ssh (ssh #ssh_user###ssh_host#) and then use mysql -u#db_user# -p#db_password#. Then I can use the mysql command line as usual, but I am trying to setup DBeaver so I have a client interface for it. Is it impossible to do when the bind-address is set to localhost?
SSH tunnel settings
host: #ssh_host#
port: 22
user: #ssh_user#
auth: (key)
SSH tunnel itself works, I tried it with ssh -L 23:#ssh_host#:22 #ssh_user###ssh_host#

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.

vagrant sequel pro SSH Tunnel remote host can't connect, bad password

I'm new to MySQL and Vagrant and spent several hours trying to set both up. I can connect to MySQL from the command line with:
mysql --host=127.0.0.1 --user=root --password=[my_password]
I'm trying to connect with Sequel Pro and following a couple tutorials have set up Vagrant/MySQL correctly, I believe. I'm trying to connect thru SSH and tried many combinations of username/password. I believe the correct inputs are:
MySQL Host: 127.0.0.1
username: root
password: [my_password]
SSH Host: 127.0.0.1
SSH User: vagrant
SSH Key: insecure_private_key
SSH Port: 2222
however I'm still getting the error "The SSH Tunnel could not authenticate with the remote host. Please check your password and ensure you still have access."
Any help is appreciated, thanks
You need to choose SSH connection type and select the correct private key.
For Vagrant 1.6 and older, the private key is located in ~/.vagrant.d/insecure_private_key. For Vagrant 1.7 and above, the private key is located in .vagrant/machines/[vm_name]/virtualbox/private_key where the Vagrantfile is located.
Try the following configuration and leave everything else blank. (Of course specify MySQL root password if you've set it up.)
MySQL Host: 127.0.0.1
Username: root
Port: 3306
SSH Host: 127.0.0.1
SSH User: vagrant
SSH Key: ~/.vagrant.d/insecure_private_key
SSH Port: 2222
I got the same error and this solved the issue for me.
ssh-add -K ~/.ssh/id_rsa
For me work added my key identity
ssh-add -K ~/.ssh/id_rsa

Connecting to AWS with MySQL Workbench

I am new to AWS RDS and I am trying to connect MySQL workbench to the instance on AWS. I want to have full admin access in the Database.
Connection Method: Standard TCP/IP over SSH
SSH Hostname: (AWS given endpoint)
SSH UserName: (not sure which user name they are asking for...ec2 or root?)
SHH Password:
SSH Keyfile: assuming this is the .pem file from AWS
MySQL HostName: 127.0.0.1
MySQL ServerPort: 3306
username: mysql username
password: mysql username password
Very new to this so any help would be greatly appreciated!
Thanks,
OK_Sooner
Be sure that security group of your instance accept connections from your ip. And as John Rotenstein said - you don't need to connect by ssh. Just connect to port 3306.

Vagrant: open mysql connection to host

I'd like to use MySql Workbench to browse my database in Vagrant from host machine.
So far I just commented the line bind-address = 127.0.0.1 in my.cnf and all was ok, but recently I connected to a new wi-fi and things seemed to change, I had to change guest ip address from 192.168.0.200 to 192.168.1.200 and I can't open mysql connection from host.
I tryed also to add bind-address = 10.0.2.2 guessing (not sure) this was my host ip but still the same.
What do I need to do?
Thank you
Define a static ip for your box like in this example:
Vagrant.configure("2") do |config|
config.vm.network "private_network", ip: "10.0.0.6"
In Mysql Workbench create a new connection over SSH:
Connection Method: Standard TCP/IP over SSH
SSH Hostname: 10.0.0.6 (like above)
SSH Username: vagrant
SSH password: vagrant
MySQL Hostname: 127.0.0.1
MySQL Username: root
MySQL Password: root
SSH Host Key identification:
Instead of a password you can use the box specific Private Key. You can get the path by executing vagrant ssh-config.