Difference between revisions of "Import MySQL Database Dump File"

From Gejoreuy
Jump to navigation Jump to search
(Created page with "== Purpose == This topic describes how to use the psql command to restore the MySQL data backup files to MySQL DB. == Import the Dump File == Just run below command and ch...")
 
 
Line 15: Line 15:
 
* username: The username to log on to MySQL database.
 
* username: The username to log on to MySQL database.
 
* hostname: The hostname of the MySQL database.
 
* hostname: The hostname of the MySQL database.
* desintationdb: The MyQL database name.
+
* destinationdb: The MyQL database name.
 
* dumpfilenamelocation : The location name of the backup file to be restored.
 
* dumpfilenamelocation : The location name of the backup file to be restored.

Latest revision as of 13:57, 22 October 2019

Purpose

This topic describes how to use the psql command to restore the MySQL data backup files to MySQL DB.


Import the Dump File

Just run below command and change it with the database value.

[root@gejoreuy ~]# mysql -u username -p -h hostname destinationdb < dumpfilenamelocation.sql

Note :

  • username: The username to log on to MySQL database.
  • hostname: The hostname of the MySQL database.
  • destinationdb: The MyQL database name.
  • dumpfilenamelocation : The location name of the backup file to be restored.