Я выше написал: данные при деинсталяции и последующей установки, либо при переустановки поверх, не удаляются.
Если надо снять какие-то права, используй оператор REVOKE.
Внимательно, какие команды к какому результату приводят:
mysql> use test
Database changed
mysql> SHOW TABLES;
+----------------+
| Tables_in_test |
+----------------+
| access_log |
| edges |
| nodes |
+----------------+
3 rows in set (0.00 sec)
mysql> CREATE USER 'xxx'@'localhost' IDENTIFIED BY 'yyy';
Query OK, 0 rows affected (0.04 sec)
mysql> GRANT SELECT ON test.* TO 'xxx'@'localhost';
Query OK, 0 rows affected (0.01 sec)
mysql> GRANT UPDATE,INSERT,DELETE ON test.access_log TO 'xxx'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW GRANTS FOR 'xxx'@'localhost';
+------------------------------------------------------------------------------------------------------------+
| Grants for xxx@localhost |
+------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'xxx'@'localhost' IDENTIFIED BY PASSWORD '*EAF818FC2F6764B7CDC4AB989BC4C194071223F9' |
| GRANT SELECT ON `test`.* TO 'xxx'@'localhost' |
| GRANT INSERT, UPDATE, DELETE ON `test`.`access_log` TO 'xxx'@'localhost' |
+------------------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)
mysql> REVOKE DELETE ON `test`.`access_log` FROM 'xxx'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW GRANTS FOR 'xxx'@'localhost';
+------------------------------------------------------------------------------------------------------------+
| Grants for xxx@localhost |
+------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'xxx'@'localhost' IDENTIFIED BY PASSWORD '*EAF818FC2F6764B7CDC4AB989BC4C194071223F9' |
| GRANT SELECT ON `test`.* TO 'xxx'@'localhost' |
| GRANT INSERT, UPDATE ON `test`.`access_log` TO 'xxx'@'localhost' |
+------------------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)
mysql> REVOKE ALL ON `test`.* FROM 'xxx'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW GRANTS FOR 'xxx'@'localhost';
+------------------------------------------------------------------------------------------------------------+
| Grants for xxx@localhost |
+------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'xxx'@'localhost' IDENTIFIED BY PASSWORD '*EAF818FC2F6764B7CDC4AB989BC4C194071223F9' |
| GRANT INSERT, UPDATE ON `test`.`access_log` TO 'xxx'@'localhost' |
+------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
mysql> REVOKE ALL ON `test`.`access_log` FROM 'xxx'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW GRANTS FOR 'xxx'@'localhost';
+------------------------------------------------------------------------------------------------------------+
| Grants for xxx@localhost |
+------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'xxx'@'localhost' IDENTIFIED BY PASSWORD '*EAF818FC2F6764B7CDC4AB989BC4C194071223F9' |
+------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> DROP USER 'xxx'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW GRANTS FOR 'xxx'@'localhost';
ERROR 1141 (42000): There is no such grant defined for user 'xxx' on host 'localhost'