Importing/Exporting MySQL Database using SSH is not a rocket science.
But it is helpful when importing/exporting large databases.
I am posting this because One of our followers Asked Me the question.
Ok, So without wasting time, Let’s start.
In order to export Database, we’ll gonna use mysqldump command.
To export just login to your SSH client and run following command
mysqldump -u{Sql user} -p{Sql password} {Database} > backup.sql
Chenge Sql username, Sql password and database name with the database you want to export.
After chenging i should looks like mysqldump -uadmin -p1234 admin > backup.sql
It’ll export current database to backup.sql of current directory.
In order to import Database, Here we’ll use mysql command.
Here we’ll import the Database we just exported.
To import just execute following command.
mysql -u{Sql user} -p{Sql password} {Database} < backup.sql
Similarly change Sql User and Sql password and database name with the database where you want to import.
I know it is a old topic, but hope You found this topic helpful. thank you.
Hello friends, I have a good news for you all! After a very long period…
Hello friends, I just received Oreo update on my mi a1. and the disaster happens! As…
Xiaomi MI A1 Received 1 January 2018 security patch even before January! Xiaomi's launched there first…
Top 5 Hand-Picked Substratum Samsung Themes Of December 2017 | Our Best Picks! How Are…
Let's Encrypt Encrypt SSL certificate along with Express Server Without using Nginx! Hello, Friends, Myself Bubun.…
[LATEST] Apk Extractor v4.2 is here!!! Hello friends, I am Roni today welcome to our…
This website uses cookies.