mysqldump -u username -p dbname > filename.sql
Load DB dump to MySQL
2.1. Open MySQL Workbrench
2.2. Connect to your local MySQL server (in "MySQL Connection" section)
2.3. Click "Server" on the main tool bar
2.4. Select "Data Import"
2.5. You should see a link to the default dump folder, typically your Documents folder in a subfolder titled
2.6. Click the
... and navigate to where your MySQL backup file is located, select the backup you want to load, and click
2.7. The schema names in your dump should appear on the left-hand side, at the bottom. Select the schemas that need to be restored.
2.8. Select Start Import on the bottom right.
Note: In MySQL Workbench you can recheck MySQL Connections and see on which host and port the server is running
server - host and port, default is
database - database name
mysql-connector-netinstalled Solution: Make sure to enable this option during the MySQL server installation.