Help us understand the problem. What is going on with this article?

mysqldump definer削除コマンドとか

More than 5 years have passed since last update.

error: SQLSTATE[HY000]: General error: 1449 The user specified as a definer

■mysqldumpしながらDEFINERを削除
mysqldump -uUSER -p DBNAME | sed -e "s/DEFINER=[^]*/*/" | gzip > database_nodefiner.sql.gz

■dumpしたsqlからDEFINERを削除
cat database.dump.sql | sed -e "s/DEFINER=[^]*/*/" > database_nodefiner.sql

corehei
LAMP開発がメインです。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away