Sorry for the mistakes I've made, I'm not Englishman.
I use vagrant to deploy remote virtual machine as my web server which is configured to use
:private_network, ip: "192.168.10.10"
$ ssh email@example.com #ok
$ mysql -h localhost -P 3306 -u root -p #ok (it's run on the remote machine)
$ telnet -l root localhost 3306 #also run on the remote machine,
Connection closed by foreign host.
In my case I had to enable TCP forwarding in the ssh configuration of the remote host:
And also I had to grant all privileges on users connection from 127.0.0.1 (instead of just from 'locahost'):
grant all privileges on some_db.* to firstname.lastname@example.org identified by 'secret';