Skip to content

Instantly share code, notes, and snippets.

@putzflorian
Created June 2, 2016 06:18
Show Gist options
  • Select an option

  • Save putzflorian/022b215738d456e1a246dc0d7a96f054 to your computer and use it in GitHub Desktop.

Select an option

Save putzflorian/022b215738d456e1a246dc0d7a96f054 to your computer and use it in GitHub Desktop.
sqluser change
mysqldump -uuser1 -ppassword1 database1 > backup.sql
sed '/^\/\*\!50013 DEFINER/d' backup.sql > backup_without_50013.sql
mysql -u user2 -ppassword2 -D database2 < backup_without_50013.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment