0

I'm trying to connect to database from remote client.

The thing is: - when I connect to MySQL through SSH (with both SSH and MySQL root for now...), in command line, it works - when I want to connect to MySQL through SSH with a remote tool (Workbench or TablePlus), with same credentials, it doesn't work

Tool configuration:
* host 127.0.0.1
* port 3306 (preset)
* user: root
* password: :-)
* database name : X
* SSL mode: tried DISABLED, REQUIRED, PREFERRED
* over SSH: CHECKED
* server: my IP
* port: 22
* user: root
* password: :-)

Test => gives "access denied for user 'root'@'localhost'

So my first thought would be to look in MariaDB Grant the remote host but I want to understand well what is going on and what the difference is between this tool and me on PUTTY connecting to SSH and then to MySQL...

Thank you!

Is there a difference? each time, some local connexion is made after a SSH login?

Thanks for your help!

slaakso
  • 8,331
  • 2
  • 16
  • 27

1 Answers1

0

I finally found the solution by reading some stuff

source 1 : Access Denied for User 'root'@'localhost' (using password: YES) - No Privileges? source 2 : https://tutox.fr/2017/12/14/en-root-pour-mariadb/ source 3 : Access Denied for User 'root'@'localhost' (using password: YES) - No Privileges? source 4 : https://tutox.fr/2017/12/14/en-root-pour-mariadb/

source 3 (for MySQL) drove me to source 4 (adapted for MariaDB) was the most important, I did

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_password');

and then

FLUSH PRIVILEGES()

and not it work.

I still don't understand why the behavior is different from these 2 points of view