Skip to content

Commit 1c9fd27

Browse files
authored
Update best-practices-least-privileged-account.md
Updated MySQL section.
1 parent 83eb294 commit 1c9fd27

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
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

366368
```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;`. .
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)