mysqld rewrite