MySQL permissions on production

Hello,

Noticed I’m getting an Errcode: 13 "Permission denied" when trying to run wp db export on a production site deployed to DO with sshd_permit_root_login: false.

An import using WP-CLI works, as do other WP-CLI commands.
I can enter mysql prompt using the mysql_root_user (left as root) and the mysql_root_password (changed from default), but cannot mysqldump, get Permission denied.
Everything works on vagrant instance.
This is consistent across multiple trellis ran servers.

My question is, is this the desired behavior? If so, how do you go about exporting the production db?

SUDO duh, nevermind - please ignore or delete