31
30

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ダンプリストア時にAccess denied; you need (at least one of) the SUPER privilege(s) for this operation

Last updated at Posted at 2014-05-13

リストア時に上記エラーが出た時に
ダンプファイルをエディタで開いて

/*!50013 DEFINER=

から始まるものがあれば、削除する。
DEFINERで定義されたユーザとリストアしようとしたユーザが異なるために起こるようです

ダンプファイルが巨大な場合、こんな感じ消してやると良いと思います(macのsedの例)。

sed -i -e 's/DEFINER=`.*`@`.*`//g' YOUR_DUMP_FILE.sql

確認。

cat YOUR_DUMP_FILE.sql | grep DEFINER
/*!50013  SQL SECURITY DEFINER */ # これはコメントだけなのでOKです :)
31
30
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
31
30

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?