Last active
March 19, 2020 10:54
-
-
Save yogeshdubey2006/b499263c49664dc2b67b5692c43999ad to your computer and use it in GitHub Desktop.
Export DB through command prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I am exporting MySQL database from xampp through command prompt | |
# First of all, open command prompt. | |
# Import Database :- C:/xampp/mysql/bin/mysql -u root -p databasename < C:/test.sql (sql file name) | |
# Export Database :- C:/xampp/mysql/bin/mysqldump -u root -p databasename > C:/text.sql(sql file name) | |
# goto | |
C:\windows\system32>cd c:/xampp/mysql/bin | |
c:\xampp\mysql\bin>mysqldump -h localhost -u root -p dbname > export.sql | |
# Import Database WINDOW: | |
C:/xampp/mysql/bin/mysql -u root -p databasename < C:/DBNAME.sql | |
Import Database: | |
mysql -u DB_USER -p DB_NAME < COMPLETE_PATH_OF_DB_SQL_FILE_LOCATION OR DB20200319.sql | |
# -h = Host Name | |
# -u = User Name | |
# dbname = Database Name | |
# export.sql = Set file name with .sql extension |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment