While it isn’t common, there may be times you need to access your Flywheel site’s database using an external tool instead of the Database manager in your Flywheel dashboard. Thanks to our SSH gateway and a nifty feature called SSH tunneling, you can do just that.
SSH tunneling allows you to set up a secure connection to transmit data via an encrypted SSH connection. In our example here we’ll be setting up MySQL Workbench, a visual database design tool, but the concepts will apply to any number of tools that can connect to a server via SSH tunneling.
That said, it’s always a good idea to create a fresh backup before altering your database.
cat ~/.my.cnfto view your site’s my.cnf file to get the host IP address, database user, and database password. Alternatively, you can download a copy of your site’s wp-config.php file and get the
In your chosen tool, fill in the connection settings to set up the connection with your Flywheel site’s database. Here’s an example in MySQL Workbench:
|Connection Name:||The name of the site or really any meaningful name you want to give the connection|
|Connection Method:||Standard TCP/IP over SSH|
|SSH Username:||username+site-slug or team+org-name+site-slug|
|SSH Password:||leave this field empty|
|SSH Key File:||upload the private key file created when you generated your SSH keys|
|MySQL Hostname:||host IP address from my.cnf or DB_HOST IP address from wp-config.php|
|MySQL Server Port:||3306|
|Username:||user from my.cnf or DB_USER from wp-config.php|
|Password:||password from my.cnf or DB_PASSWORD from wp-config.php|
Your SSH username begins with your Flywheel username, which can be found in a couple of different ways:
The second part of your SSH username is the site-slug, which can be found in a couple of places:
Once you’ve got everything filled out, you can test and save your connection settings. Now you can connect to your Flywheel site’s database whenever you want to!
If you have any questions our Happiness Engineers are here to help!
New to Flywheel? Start here, we've got all the information you'll need to get started and launch your first site!View all
Learn all about managing your Flywheel user account, Teams and integrations.View all
Everything about billing, invoices and payments can be found here.View all
Flywheel hosting plans include a ton of great features. Learn about how to get a free SSL certificate, set up a staging site, and more!View all
All the server and setting info you'll need to help you get the most out of your Flywheel hosting plan!View all
Tips and tricks for managing your sites on Flywheel, including going live, troubleshooting issues and migrating or cloning sites.View all
Learn how to connect, deploy, and more with SSH on Flywheel's platform.View all
Learn more about Growth Suite, our all-in-one solution for freelancers and agencies to grow more quickly and predictably.
Getting started with Growth Suite
Growth Suite: What are invoice statuses?
Growth Suite: What do client emails look like?
Learn more about Managed Plugin Updates, and how you can keep your sites up to date, and extra safe.
Managed Plugin Updates: Database upgrades
Managed Plugin Updates: Pause plugin updates
Managed Plugin Updates: Plugin Security Alerts