Mysql database table permissions granted to the user

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/hjtlovelife/article/details/90731423

After the production environment read and write permissions users can not access other databases and user-created table, just think of it forgot to target users authorized, owner End users create database tables and grant privileges to users read and write permissions, authorization statement is as follows:
Grant All privileges ON . databaseName * to TargetUserName @ "%" IDENTIFIED by 'targetPassword';
Grant the SELECT, the Delete, Update, INSERT ON databaseName * to TargetUserName @ "%" IDENTIFIED by 'targetPassword';.
. Grant the SELECT ON databaseName * to TargetUserName @ "% "identified by 'targetPassword';

Guess you like

Origin blog.csdn.net/hjtlovelife/article/details/90731423