MySQL Workbench: Connection Creation and Trouble Shooting (for beginners)

MySQL · 607K views · 2014 · 23:50

Open on YouTube

Databases & storageTesting, debugging & developer toolstutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering MySQL Workbench connection errors, SSH tunnel setup questions and 'can't connect to server' problems.

Recommended by 2 people across 10 different months, 2014 to 2017.

What it is

A 24-minute beginner tutorial from the official MySQL channel showing how to create connections in MySQL Workbench and what to check when they fail. It covers connection types including SSH tunnels, plus pitfalls such as IPv4 vs IPv6 localhost, firewalls and user host permissions. It was recorded by Mike Lischke of the Workbench team.

What people said

Recommends Mike Lischke · 2014-04 · Stack Overflow · on “Unable to connect to any of the specified MySQL hosts when checking connection”

The "Can't connect to MySQL server" error usually is the result of not being able to reach the server, e.g. if it is not running or it is on a remote machine but firewalls block access. See also the video I added to the MySQL channel [this video] for how to set up connections.

Recommends Mike Lischke · 2014-04 · Stack Overflow · on “Not able to access mysql server using workbench on local network connection”

A month ago I added a video to Youtube Connection creation and troubleshooting [this video] (around minute 7) that also describes the IPv4 vs IPv6 pitfall via localhost.

Recommends Mike Lischke · 2014-06 · Stack Overflow · on “connect to remote mysql db server”

See MySQL Workbench: Connection Creation and Trouble Shooting (for beginners) [this video] for problems like this.

Recommends Mike Lischke · 2014-10 · Stack Overflow · on “connect to localhost in MySQLWorkbench”

For general informations about creating connections in MySQL Workbench watch my Youtube video: [this video] . It shows what can go wrong with addresses and ports. Generally speaking, make sure that the user you are connecting with has the proper rights to 1) connect from the given machine (see in the video sometimes localhost is not equal to the IPv4 loopback address 127.0.0.1) and 2) has the rights to create objects, query them and so on. The root user usually has these rights, but sometimes, with custom installations, it can happen this has been changed.

Recommends Mike Lischke · 2014-11 · Stack Overflow · on “(Win7/Putty) How to use MySQL Workbench to connect to a DB server which is only accessible after ssh'ing to a jump server”

MySQL Workbench supports SSH connections. This way you can use a jump server via SSH and connect from there to your real server. Just select the "Standard TCP/IP over SSH" connection type when you create a new connection. In my tutorial video in the MySQL channel on Youtube [this video] , about connection creation and troubleshooting, I show (among other things) how to set up such an SSH connection.

Recommends Mike Lischke · 2014-11 · Stack Overflow · on “MySQL Workbench failed to connect”

This is a very unusal error message which I haven't seen before, especially on Windows. It has probably to do with how the server is installed. As a newbie it would definitely be the best choice to use the Windows Installer [LINK] for all required parts. This will install the server properly too. By using xampp you are on your own to check whether a server is installed and running as a service, as well as the proper configuration. For troubleshooting watch my video on Youtube [this video] where I tried to explain most common pitfalls for beginners. Note: you can open the connection without actually being connected. In that case MySQL Workbench allows to do all those things that don't require a va

Recommends Mike Lischke · 2014-12 · Stack Overflow · on “Standard TCP/IP over SSH and MySQL Workbench”

I recommend watching my tutorial video [this video] which explains those details and tries to help troubleshooting connection problems. Additionally, you may want to establish an ssh connection via the terminal to get the idea of how ssh works (creating an SSH tunnel to a remote host and operating from there as if it where local). Also, use SSH only if needed. If you can reach the server directly, then do so. Some more info about SSH work: The ssh host is the machine where the SSH server is running on. You always connect to an SSH server which is then creating a tunnel between itself and the client from which you connect. This tunnel transparently forwards commands so that it appears as if you we

Recommends Philip Olson · 2015-01 · Stack Overflow · on “MySQL Workbench 6.0 and Windows 8 - Failed to connect to MySql at localhost?”

Please upgrade to Workbench 6.2.x before proceeding, and view this useful MySQL connection related video -- [this video]

Recommends Mike Lischke · 2015-07 · Stack Overflow · on “Can't access MySQL through MySQL Workbench or HeidiSQL, but can access through shell”

You must be more specific about the credentials you got. Is "server IP" the IP address of the MySQL server or an SSH server? Is the "server username" the SSH user or something else (e.g. a regular user of the target machine)? In my tutorial video on Youtube I explained what you have to use where to create a connection, including SSH connections: [this video]

Recommends Mike Lischke · 2015-10 · Stack Overflow · on “Connecting to Remote MySQL DB over ssh with workbench”

I think there are a few misunderstandings here. A firewall is not protected by a keypair. An SSH connection is. The firewall only filters network traffic using specific rules (e.g. only let it pass for enabled network ports). When you use an SSH connection you have to use the MySQL address as seen from the remote SSH connection end. That means if the MySQL server runs on the same machine as the SSH server (which is what you connect to when you use an SSH tunnel) then the address is localhost (or the IPv4/IPv6 loopback address). See my video about connection creation and troubleshooting [this video] on Youtube for more details.