For quick access or when enabling remote access is not possible, ssh tunneling/port forwarding can be used to access a database (that is not allowed to be accessed remotely) temporarily
First create a SSH session with port forwarding
ssh -L 3300:localhost:3306 user@server
Then connect using the local port on local machine