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.cnf
to 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 DB_HOST, DB_USER,
and DB_PASSWORD
values.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 Hostname: | ssh.getflywheel.com |
SSH Username: | username+site-slug OR team+org-name+site-slug (see below for examples) |
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 |
You can connect to a site using your user account or an organization (org) account.
username+site-slug
(Example: flytrevan+super-fly).team
first, then org-name+site-slug
(Example: team+fly-design-studio+super-fly).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 allLearn all about managing your Flywheel user account, Teams and integrations.
View allFlywheel 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 allAll the server and setting info you'll need to help you get the most out of your Flywheel hosting plan!
View allTips and tricks for managing your sites on Flywheel, including going live, troubleshooting issues and migrating or cloning sites.
View allLearn 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.
Restoring Plugin and Theme Management on Flywheel
Managed Plugin Updates: Database upgrades
Managed Plugin Updates: Pause plugin updates
We can help! Check out our Brand Resources page for links to all of our brand assets.
Brand Resources