title: Stored Procedure with ALTER TABLE
body: <p>I have a need to sync auto_increment fields between two tables in different databases on the same MySQL server. The hope was to create a stored procedure where the permissions of the admin would let the web user run <code>ALTER TABLE [db1].[table] AUTO_INCREMENT = [num];</code> without giving it permissions (That just smells of SQL injection).</p>
  
  <p>My problem is I'm receiving errors when creating the store procedure. Is this something that is not allowed by MySQL?</p>
  
  <p><code>
  DROP PROCEDURE IF EXISTS sync_auto_increment;<br>
  CREATE PROCEDURE set_auto_increment (tableName VARCHAR(64), inc INT)<br>
  BEGIN<br>
      ALTER TABLE tableName AUTO_INCREMENT = inc;<br>
  END;
  </code></p>