Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Connect to MySQL via SSH

DZone's Guide to

Connect to MySQL via SSH

· Integration Zone ·
Free Resource

The Future of Enterprise Integration: Learn how organizations are re-architecting their integration strategy with data-driven app integration for true digital transformation.

I use the excellent HeidiSQL as a GUI when working with MySQL.

I've recently set up a new server and knew that HeidiSQL has support for connecting via an SSH tunnel. As a note to myself, these are the settings:

Settings tab:

Network type: MySQL (SSH tunnel)
Hostname / IP: locahost
User: mysqlusername
Password: mysqluserpassword

SSH tunnel tab:

plink.exe location: c:\somedir\plink.exe
SSH Host: my.server.com
SSH port: 22
Username: mysshuser
Password: mysshpassword

The key thing to note is that on the settings tab you need to enter localhost and the username and password of the MySQL user. This is because HeidiSQL connects to MySQL once you're connected via an SSH login.

Make your mark on the industry’s leading annual report. Fill out the State of API Integration 2019 Survey and receive $25 to the Cloud Elements store.

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}