Post

DB Dump

DB Dump

Import Data use WSL

Export .sql file in Database

  • Create an folder for store .sql file
    • Login to the Database find out the database SHOW DATABASES;
    • backup command
    • mysqldump -u your-username -p your-database-name > /home/ec2-user/backups/your_database_backup.sql
  • Example : mysqldump -u your-username -p your-database-name > /home/ec2-user/backups/your_database_backup.sql

Go to File Explore Linux Distro \wsl.localhost\Ubuntu-22.04\tmp

login to Database Use this Commands to dump

Pgsql

Switch to Main to over db name
1
\c db_name
use this Command dump
1
\i /tmp/bip.sql

mysql

Switch to Main to over db name
1
USE mydatabase;
use this Command dump
1
source /tmp/sample.sql;

Export Data use HeidiSQL

website Link

Output : Single SQL File.sql

This post is licensed under CC BY 4.0 by the author.