Skip to content

Commit 5e9c898

Browse files
Merge pull request #303965 from Molishv/patch-7
Update best-practices-least-privileged-account.md
2 parents 0412e3a + 1a3d44a commit 5e9c898

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

articles/migrate/best-practices-least-privileged-account.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,16 @@ Ensure that the user who corresponds to the added MySQL credentials has the foll
361361
- Select permission on `information_schema` tables
362362
- Select permission on `mysql.users` tables
363363

364+
For MySQL discovery, ensure the appliance's IP or domain is allowed by configuring the necessary firewall rules and MySQL user privileges. The bind-address in my.cnf should also be set to allow external connections if needed.
365+
364366
Use the following commands to grant the necessary privileges to the MySQL user:
365367

366-
```sql
367-
GRANT USAGE ON . TO 'newuser'@'localhost'; GRANT PROCESS ON . TO 'newuser'@'localhost'; GRANT SELECT (User, Host, Super_priv, File_priv, Create_tablespace_priv, Shutdown_priv) ON mysql.user TO 'newuser'@'localhost'; FLUSH PRIVILEGES;`. .
368+
```Mysql
369+
GRANT USAGE ON *.* TO 'username@ip';
370+
GRANT PROCESS ON *.* TO 'username@ip';
371+
GRANT SELECT (User, Host, Super_priv, File_priv, Create_tablespace_priv, Shutdown_priv) ON mysql.user TO 'username@ip';
372+
GRANT SELECT ON information_schema.* TO 'username@ip';
373+
GRANT SELECT ON performance_schema.* TO username@ip';
368374
369375
```
370376

0 commit comments

Comments
 (0)