Bizarre. When I tried to upgrade a MySQL installation just now, I got this error message:
s: cannot create /dev/null: Permission denied
That looked odd, since everyone should be able to write to that file, so I tried to see what was wrong:
$ ls -l /dev/null
ls: /dev/null: No such file or directory
Curiouser and curiouser.
After logging out and logging back in, though, /dev/null was back again (as a special file "0, 6"), and I was able to run the script.