Posted By

cerxx on 11/15/18


Tagged

tools


Versions (?)

How to import or export a database via SSH?


 / Published in: MySQL
 

URL: https://www.jino.ru/help/faq/mysql-general/

#

Import DB:

mysql -u UserDB -p NameDB < file_dump.sql

#

Export (create backup):

mysqldump -u UserDB -p NameDB > $(date '+%Y-%m-%d-%H-%M').sql

  1. Often, importing AND exporting DATABASES IS more convenient to DO NOT through the phpMyAdmin interface, but with the HELP of terminal commands, connecting to the server via SSH. This IS especially useful WHEN you need to load OR unload a large database.

Report this snippet  

You need to login to post a comment.