OSuser - the user of the Ubuntu that has right to connect remotely
XX.XX.XX.XX: the IP address of the remote server
-L 3306:XX.XX.XX.XX:3306 binds the local port 3306 to the remote port 3306 on host XX.XX.XX.XX.
Connecting Remotely with HeidiSQL
install HeidiSQL
Start HeidiSQL.
Click New - in Session Manager window.
Enter a name and press ENTER
tab Settings
Chose network type: MySQL( SSH tunnel )
Hostname / IP: 127.0.0.1 ( Or a domain name or your server IP address)
User: the one that is allowed to connect remotely
Password: the password for the database user.
Port: 3306 (or the one that is set up)
Databases: it's optional or you can put the schema that you need.
tab SSH Tunnel
plink.exe location - the path to plink.exe(which is part of PuTTy). in order to create an SSH tunnel it's needed PuTTY: a free SSH and Telnet client; You can installed it or use it as portable version.
SSH Host + port: give the address of the server - the one of the database and the port as well: XXX.XXX.XXX.XXX : 22
Username - the OS user used to connect to the server
Password - the password of the user
Private key file - in order to connect you need to have private key (example my-key-pass.ppk). You can generate a pair from Ubuntu and Putty.
The connection should be visible in left window: session names