Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Sanjay Sardana
Sanjay Sardana
1,318 Points

How do I open an existing MySQL database in Workbench?

I have an existing database that I would like to import/open in MySQL Workbench. How do I do that

1 Answer

Sanjay, Do you already have a server running in your local environment? If so, you should be able to see it within Workbench. From the main Workbench screen, you should see any db instances you have available on your server. Clicking the local instance should open you up to the query environment where you can see your databases in the "Navigator" panel.

If you using an all-in-one install like WAMP, LAMP, XAMPP, etc... you'll need to make sure you server is running before you can see it in Workbench.

If all you have is the <db_name>.sql file and you want to be able to use that in Workbench, then you'll need to import it into your server using something like phpMyAdmin. Workbench is just a GUI interface to a server environment.