I have created a forwarder (via SSH) from machine A to machine B. Machine B has a MySQL instance running, with a root account using unix_socket authentication:
+----------+-----------+-------------+
| User | Host | plugin |
+----------+-----------+-------------+
| root | localhost | unix_socket |
+----------+-----------+-------------+
I am unable to log in as root from machine A, regardless of the password I use (blank, the Linux root password, etc...):
machineA:~$ mysql -h 127.0.0.1 -P 1111 -u root -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
machineA:~$ mysql -h 127.0.0.1 -P 1111 -u root
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
The same happens if I try to log in into mysql from machine B with an account that is not the root account.
How can I log in into MySQL?