Can't connect to MYSQL from CLI with --port specified

I thought that the problem will go away with the upgrade. I performed it like advised here but with no success. The other aspect of this is that I cannot connect to a db through the ssh tunnel using dbeaver.

Does it sound like an installation-specific issue? Or is that a general behaviour and I just need to fix something? Please, share your knowledge.