Connecting to my DB using MySQL Workbench

Linode Staff

How do I configure and connect to my database using MySQL Workbench?

1 Reply

Prerequisites

If you havent already done so, you’ll need to have MySQL Workbench installed on your computer first. To download it, visit the MySQL Workbench downloads page: https://dev.mysql.com/downloads/workbench/. MySQL Workbench is available for Windows, Linux and macOS.

Remote Connections

Before working with MySQL Workbench, your database will need to be configured to accept remote connections. If you still need to configure this, the following post can help with this: https://www.linode.com/community/questions/330/how-do-i-configure-mysql-for-remote-access


Connection Setup

Once your MySQL database is configured to accept remote connections, you’ll need to configure MySQL Workbench so it can connect to your Linode (and your database). You should only need to do this once (or if something changes like your IP or root password).

  1. Launch MySQL Workbench
  2. Click the + symbol in the MySQL Connections tab
  3. This will open a Setup New Connection form that needs to be completed. You'll want to configure the connection as follows:
    1. Connection Name -> enter a name for your connection here
    2. Connection Method (Type) -> From the dropdown, select “Standard (TCP/IP)”
    3. In the Parameters section:
      • Hostname -> enter the Linode’s IP address
      • Port -> 3306
      • Username -> root
      • Password -> Click the Store in Vault… button and enter the correct password
    4. Click Test Connection to make sure you can connect to the DB. If the connection is successful, click OK to save the connection configuration.

Now that the connection has been saved, it should appear on your home screen of MySQL Workbench. Click the newly created connection under the MySQL Connections section of the home page to connect. Once connected, the SQL editor window will open and you can interact with the server using SQL commands. :)


If you run into any issues with your connection later on, you may need to manage your connection via the MySQL Connection Manager. https://dev.mysql.com/doc/workbench/en/wb-manage-server-connections.html

For additional information on MySQL Workbench, it may be best to check the MySQL Workbench manual:

https://dev.mysql.com/doc/workbench/en/

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct