Generating a whole database script in MySQL Workbench

352565 pts.
Tags:
Database
MySQL
Would there be a way to generate a whole database script in MySQL Workbench? I'm trying to take the whole database so where would I find the file? Also, I would write the data to the text file (Like SQL Server). Appreciate the help.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • clark445kent

    In Workbench Central (the default "Home" tab) connect to your MySQL instance, opening a SQL Editor tab.

    Click on the SQL Editor tab and select your database from the SCHEMAS list in the Object Browser on the left.

    From the menu, select Database > Reverse Engineer and follow the prompts. The wizard will lead you through connecting to your instance, selecting your database, and choosing the types of objects you want to reverse engineer. When you're all done, you will have at least one new tab called MySQL Model. You may also have a tab called EER Diagram which is cool, but not relevant here.

    Click in the MySQL Model tab

    Select Database > Forward Engineer

    Follow the prompts. Many options present themselves, including Generate INSERT Scripts for Tables which allows you to script out the data contained within your tables (perfect for lookup tables).

    Soon you will see the generated script in front of you. At this point you can Copy to Clipboard or Save to Text File.

    The wizard will take you further, but if you just want the script you can stop here.

    A word of caution: the scripts are generated by the CREATE command. If you want ALTER you'll have to (as far as I can tell) manually change the CREATEs to ALTERs.

    3,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following