vi /etc/sudoers
Allow root to run any commands anywhere
root ALL=(ALL) ALL
#新增一行 请替换tidb为你的TIDB用户
tidb ALL=(ALL) ALL
Allows members of the ‘sys’ group to run networking, software,
service management apps and more.
%sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
#新增一行 请替换tidb为你的TIDB用户
%tidb ALL=(ALL) ALL
Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL
#新增一行 请替换tidb为你的TIDB用户
%tidb ALL=(ALL) NOPASSWD: ALL