Yes, of course, there is a solution in your mysql for your problem.
Use GRANT and REVOKE for this, they lie under the DATA CONTROL LANGUAGE in SQL.
I gave an example of how to use it.
mysql> revoke all privileges on *.* from 'root'@'localhost';
Using this query, I revoked all root privileges in all tables of all databases. If I want this in the case of any particular database, then ..
mysql> revoke all privileges on exampledatabase.* from 'root'@'localhost';
If I want this in the case of any particular table, then ..
mysql> revoke all privileges on exampledatabase.mytable from 'root'@'localhost';
If I want to restrict a specific privilege in the case of any particular table, then ..
mysql> revoke select on exampledatabase.mytable from 'root'@'localhost';
Now I want to grant a specific privilege to the root user in the case of a specific table.
mysql> grant select on exampledatabase.mytable to 'root'@'localhost' identified by password '*A4B6157319038724E3560894F7F932C8886EBFCF' with grant option ;
source share