Skip to content

Instantly share code, notes, and snippets.

@megane9988
Last active February 11, 2016 23:23
Show Gist options
  • Save megane9988/2aab28d888459939285a to your computer and use it in GitHub Desktop.
Save megane9988/2aab28d888459939285a to your computer and use it in GitHub Desktop.
mysqlのユーザ追加と、インポート
# ユーザ作成
grant all privileges on [データベース名].* to [ユーザ名]@localhost identified by '[パスワード]';
# ダンプ
mysqldump -u root -p database_name > dump.sql
# インポート
mysql -u [ユーザ名] --default-character-set=utf8 -p [データベース名] < インポートするファイル名
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment