MySQL User AutoIncrement Permissions Restriction
- by psayre23
I have two databases that need to have their auto increment ids on various tables synced. Right now, I have a PHP function that checks the current auto increment id for both tables and then sets the lowest to the highest. If there is a better way to do this, I'm all ears.
I really don't want to give the web user alter permissions, as a SQL injection could clear all passwords (or something else silly). Is there any way to restrict a MySQL user to changing auto increment without opening it up to alter statements?