Skip to content

Instantly share code, notes, and snippets.

@nitsx2
Last active June 10, 2019 06:02
Show Gist options
  • Save nitsx2/e9885e0bbff58dc5d9f96cc73d45133d to your computer and use it in GitHub Desktop.
Save nitsx2/e9885e0bbff58dc5d9f96cc73d45133d to your computer and use it in GitHub Desktop.
mysql dump import and export
to export dump(means create a .sql file to use) -> mysqldump -u root -p database_name > ~/Desktop/db.sql
to import dump(means use the given dump in database) -> mysql -u root -p database_name < ~/Desktop/db.sql
dump only 10 rows of every table in database - > mysqldump -u root -p --opt --where="1 limit 10" database_name > /home/dell/Desktop/ff.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment