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

Databases

Can I export a database from Workbench as a .db file?

Sorry if this is an obvious question. I want to create a database seed file from a database I've constructed in Workbench. Is this possible?

3 Answers

MySQL Workbench? You can export a .sql file: https://dev.mysql.com/doc/workbench/en/wb-admin-export-import.html

Steven Parker
Steven Parker
242,191 Points

So you want to convert your database to Microsoft Access?

The most direct way would be to create an ODBC connection from Access to your MySQL server. Then you can easily copy the tables and data from inside Access. Check your Access documentation for info about connecting to external databases.

You can also use an export function. If they don't have an export directly into Access format, you can probably find a common format (perhaps CSV) to export to and then load your schema and data into Access.

And a web search might even turn up some third-party tools or plug-ins that might convert/export directly to Access.

Yes sorry should have clarified: MySQL Workbench. I can export as a .sql file but just wondering how exactly one would create a .db file besides using the command line...