E
E
elyor2015-06-23 18:06:24
MySQL
elyor, 2015-06-23 18:06:24

setting grant in mysql?

You need to give the user the following rights:
1 - read only on existing tables
2 - DDL (create, alter, drop, etc)
3 - full rights to new tables created by him
Is it possible to somehow list the rights separately as access-lists in the same nginx, squid, apache?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor, 2015-06-24
@fredyk

# Syntax #
GRANT [type of permission] ON [database name].[table name] TO '[username]'@'localhost';
1. GRANT SELECT ON *.* TO User;
2. GRANT ALL PRIVILEGES ON *.* TO User;
# Types of permissions
CONNECT - The right to register
RESOURCE - The right to create base tables
DBA - The database administrator
SELECT - The right to read rows in the table
UPDATE - The right to change rows in the table
INSERT - The right to create rows in the table
DELETE - The right to delete rows in the table
CREATE - The right to create databases and tables
ALTER - The right to change databases and tables
DROP - The right to delete databases and tables
GRANT OPTION - The right to issue / withdraw rights from users
INDEX - The right to create INDEX in the
REFERENCES table - The right to create PARENT KEYS in the table, which he can refer to from his tables
ALL PRIVILEGES - All possible
USAGE - Remove all rights (synonymous with NO PRIVILEGES)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question