Please note that MySQL Workbench in its latest edition (8.0.19) corrects yet another severe vulnerability. Regrettably, most variants of MySQL Workbench 8 are incompatible with MySQL 5.7 and MariaDB, and require MySQL 8. Exercise caution using this software, and consider alternatives such as DBeaver (dbeaver.io).
The following instructions are for older (and therefore insecure) versions of Workbench.
The program MySQL Workbench, available for Windows, Mac and Linux, is an easy-to-use program for administering and backing up a MySQL database.
Follow these steps to import your database and/or backup with MySQL Workbench.
Note! Version 6.3.6 has a serious bug and cannot be used. More recent versions should work, such as 6.3.8 in Debian Stretch.
- Open your .sql file in e.g Textwrangler or other editor, and make sure the details for your new database is updated. These details(host and databasename) were sent to you when the database was created.
- Check that you have a recent version of MySQL Workbench installed. You will see this error message at the bottom of the window if you have an outdated version.
- Create a new connection profile by clicking on the plus sign next to "MySQL Connections".
- Enter the recieved login information for MySQL.
- When the connection profile is created, click on it to connect.
- Note: WorkBench may issue a warning about MySQL version. This is not a problem, click "Continue Anyway".
- Enter the program menu, select "Server", and then "Data Import".
- Select "Import from Self-Contained File" and choose which file you want to upload. Now you can start the import by clicking on "Start Import"
- If the import was successful you will see the following message.