Skip to content

Instantly share code, notes, and snippets.

@mb00g
Last active November 22, 2019 07:14
Show Gist options
  • Select an option

  • Save mb00g/44d7960dc5a66a044dce to your computer and use it in GitHub Desktop.

Select an option

Save mb00g/44d7960dc5a66a044dce to your computer and use it in GitHub Desktop.
export import mysql

EXPORT

mysqldump -Q -- databases nama_db > file_db.sql

IMPORT

mysql> create database nama_db;
mysql> create user 'nama_user'@'localhost' IDENTIFIED BY 'password_user';
mysql> grant all privileges on nama_db.* TO 'nama_user'@'localhost' WITH GRANT OPTION;
mysql> use nama_db;
mysql> \. nama_db.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment