Exporting the Table
To export the table run the following command from the command line:
“mysqldump -p – –user=username dbname tableName > tableName.sql”
To export the table run the following command from the command line:
“mysqldump -p – –user=username dbname tableName > tableName.sql”
This will export the tableName to the file tableName.sql.
[NOTE: there should be no space between the two dashes, but I have to write it that way so that it display properly].
[NOTE: there should be no space between the two dashes, but I have to write it that way so that it display properly].
Importing the TableTo import the table run the following command from the command line:
mysql -u username -p -D dbname < tableName.sql
mysql -u username -p -D dbname < tableName.sql
The path to the tableName.sql needs to be prepended with the absolute path to that file. At this point the table will be imported into the DB and you are ready to go!
No comments:
Post a Comment