Recreate MySQL views without definer, one-liner solution (Linux)
Rather cryptic headline describes a pain many of us have to go through when restoring MySQL database backup from different machine. If you have ever done this on database with DB views - you'd probably run at this problem too.
Source of the problem is that MySQL dump exports CREATE VIEW DLL with DEFINER attribute and there is no way how to instruct it to exclude this attribute (as far as I know). When you take such export and import it for example on developer machine you'd probably not have the same user or user with same privileges on this machine. Each and every select to the views with invalid definer fails with error - for example: