Export mysql database in one click from vscode.
Create a JSON configuration file inside your project folder in the following structure:-
YOUR_FOLDER/.vscode/mysql-export.json
Define your MySQL server configuration in that JSON file.

When you want to export, Click on Export MySQL from status bar or open command palette, type Export MySQL and hit enter.
-
exporter- Which exporter to use. values can be (mysqldumpormysqldump-npm). Default ismysqldump.-
mysqldumpis the exporter that comes with mysql. It reduces export file size and also supports special characters like emoji. We encourage using it. You need to have mysql installed in your system. -
mysqldump-npmwill use a node.js package for exporting sql. It produces larger export files and doesn't support special characters like emoji. You don't need to have mysql or node.js installed. If you want to use very simple configuration - (example: just providing the host, user, pass, db, destination), using this option is suitable for you.
-
-
mysqlDumpDir- Specify the mysqldump executable folder path if you are usingmysqldumpas exporter. Example:C:/wamp64/bin/mysql/mysql8.0.27/bin. Not necessary to specify if you are usingmysqldump-npmas exporter. -
useCustomCommand- Whether or not you want to use your custom command. Applicable when usingmysqldumpas exporter. Default isfalse. If you set it totrue, you must specifycustomCommandoption and the rest of the options (host, user, pass, port, db, destination) will not be necessary. Not necessary to specify if you are usingmysqldump-npmas exporter. -
customCommand- Your custom mysqldump command. Example:mysqldump -h 127.0.0.1 -u root -p --default-character-set utf8mb4 mess > c:\wamp64\www\etoiles\etoiles.sql. You will be promted to provide the db password afterwards. Not necessary to specify if you are usingmysqldump-npmas exporter. -
host -
user -
pass -
port -
db -
destination- Where and in which name you want to save the exported file. Default:db.sql
- Rise a ticket here or feel free to create Pull Requests!
- 0.0.5 - Fixed issue of space in mysqldumpdir
- 0.0.4 - Readme change
- 0.0.3 - Changed default exporter
- 0.0.2 - Readme change
- 0.0.1 - First version containing all basic features
