MySQL Tutorial/Privilege/Local User

Материал из SQL эксперт
Перейти к: навигация, поиск

Give ALL PRIVILEGES on a database to a local user who has to use a password to access the database

GRANT ALL PRIVILEGES
ON myDatabase.*
TO newuser@localhost
IDENTIFIED BY "newpassword";


To restrict the user to manipulating data (rather than table or database structures)

GRANT SELECT,INSERT,UPDATE,DELETE
ON myDatabase.*
TO newuser@localhost
IDENTIFIED BY "newpassword";