Connecting to my DB using MySQL Workbench
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.
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
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).
- Launch MySQL Workbench
- Click the + symbol in the MySQL Connections tab
- This will open a Setup New Connection form that needs to be completed. You'll want to configure the connection as follows:
- Connection Name -> enter a name for your connection here
- Connection Method (Type) -> From the dropdown, select “Standard (TCP/IP)”
- 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
- 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: