MySQL User AutoIncrement Permissions Restriction
Posted
by psayre23
on Stack Overflow
See other posts from Stack Overflow
or by psayre23
Published on 2010-03-19T17:10:57Z
Indexed on
2010/03/19
18:01 UTC
Read the original article
Hit count: 206
mysql
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?
© Stack Overflow or respective owner