![]() ![]() I imagine the exact list of allowed permissions may change with new versions of MySQL and over time, so hopefully this answer doesn't age too quickly.Įdit: Credit where credit is due - most of this I figured out thanks to this blog post on the issue. mysql -u root -p The system presents the MySQL prompt. Allow user to use the CREATE USER, DROP USER, RENAME USER, and REVOKE ALL PRIVILEGES. Enter your current password to complete the login. First, access the MySQL console from the server hosting MySQL with the command: Once at the MySQL console, create the new user and add GRANT OPTION, which. Allow user to alter and drop stored procedures or stored functions. The -p flag makes MySQL prompt for a password. The WITH GRANT OPTION clause gives the user the ability to give to other users any privileges the user has at the specified privilege level. Quote from the documentation: The optional WITH clause is used to enable a user to grant privileges to other users. It specifies the root user with the -u flag. all does not include the grant privilege. How to Create a MySQL User Account and Grant All Privileges Just as you start using MySQL, you’ll be given a username and a password. UPDATE, RELOAD, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, CREATE TEMPORARY TABLES Step 1: Access the MySQL Server Open a terminal to access the MySQL server from the command line using the following command. For that, I found I could specify all permissions EXCEPT CREATE TABLESPACE, FILE, SHUTDOWN, and SUPER globally: GRANT EXECUTE, PROCESS, SELECT, SHOW DATABASES, SHOW VIEW, ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE,ĭELETE, CREATE VIEW, INDEX, EVENT, DROP, TRIGGER, REFERENCES, INSERT, CREATE USER, I had to use two GRANT queries to maximize permissions for a new user on RDS MySQL.Īs others have mentioned, this query grants full permissions to all databases except certain system databases (Note the `%` instead of *): GRANT ALL PRIVILAGES ON `%`.* TO my needs, I also needed as many permissions as possible on the systems tables (so this user could, for example, create new users). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |