Workbench

How to start MySQL Workbench

If you have already installed it, open the “MySQL” folder from the Windows Start menu with your mouse. There is a shortcut for “MySQL Workbench” in the folder, so click on it to start it.

MySQL Workbench

#How to check and use Schema

When you start MySQL Workbench, the DB may not be displayed. At startup, “Administrator” may be selected in the Navigator panel on the left side of the screen, so select the “Schemas” tab. MySQL Workbench

This allows you to display registered DBs, edit tables on DBs, etc. MySQL Workbench

Schema display update

If you want to update what you see on your screen, such as when you create a table, click the small “Refresh” icon in the image below. Rreload

Import CSV

The features of MySQLWorkbench’s CSV import are as follows:

  • When importing into an existing table, column names and number of columns must match exactly.
  • If you don’t have a table yet, you can choose to create a new one in the import wizard

Now let’s actually import it. There is already a table called test in the DB, and we want to add 3 records to it in the text.csv file.

To import a CSV file into a table

  1. There are no records in the test table

    workbench-import-before.png
    Figure: Empty
  2. Right-click the table name you want to import (here test) and select “Table Data Import Wizard”

    workbench-import-menu.png
    Figure: Import Menu

  3. A dialog will appear, select the file to import and select “Next”

    workbench-import-wizard-dialog.png
    Figure: Import File
  4. Choose whether to add data to an existing table or create a new table and import data into it.

    workbench-import-wizard-table.png
    Figure: Import File
    5. Set whether to include column names during import, etc. ![Table](/it-learning/assets/docs/dbclient/workbench/workbench-import-wizard-column.png)
  5. A confirmation screen will be displayed, so proceed to the next step Data Data2

  6. After executing the import, the results screen will be displayed. Press “Finish” to close the screen After

  7. Check the table to see the imported data Imported Data

CSV export

To export table data to a CSV file, run the “Table Data Export Wizard”.

To export table data to a CSV file

  1. Right-click the table and select “Table Data Export Wizard” Export Wizard

  2. Select the output column Export Clumn

  3. Specify the output file etc. Export Type

  4. Execute the process Export Do1 Export Do2

  5. Processing completed Export Finished

  6. The CSV file is output to the specified location Export Finished