The root password will be flying across the wire in cleartext, you know that, right?
No -w, or use strict?
Aside from that, looks interesting. The taint checking may be needless paranoia, but I'm not sure, since I don't know how the 3rd arg to DBI->connect gets validated. So I'd rather be paranoid...