Le 11/03/2018 à 13:25, Ph. Gras a écrit : > Moi, j'y arrive quand bien même mon tunnel SSH n'est pas sur le port 22 : > > # mysql -u root -p mysql-base.alwaysdata.net > Enter password: > ERROR 1049 (42000): Unknown database 'mysql-base.alwaysdata.net' > # mysql -u user -p mysql-base.alwaysdata.net > Enter password: > ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using password: YES) > # mysql -u user -h mysql-base.alwaysdata.net > ERROR 1045 (28000): Access denied for user 'user'@'MON IP' (using password: NO) > # mysql -u user -p -h mysql-base.alwaysdata.net > Enter password: > ERROR 1045 (28000): Access denied for user 'user'@'MON IP' (using password: NO) > # > > Logique, puisque l'utilisateur user n'existe pas et je n'ai pas le password. > > Mais le serveur mysql-base.alwaysdata.net répond ;-) > > Je pense que c'est ton script qui déconne quelque part. > > Bonne pioche, > > Ph. Gras Pour la simple connexion mysql, ça fonctionne parfaitement avec mon script : mysql -uUTILISATEUR -pPASSWORD -hSERVEUR -D BASEDEDONNEES -e 'SELECT * FROM TABLE' Exemple si j'intérroge une table ici : mysql: [Warning] Using a password on the command line interface can be insecure. +----------------------------+ | Tables_in_base_affiliation | +----------------------------+ | table_affiliation | | table_canalweb | | table_langue | | table_partenariat | | table_pays | +----------------------------+ Allé, j'ai tenté, avec le paramètre --ssl comme conseillé par l'hébergeur, j'obtiens ceci : mysql: [Warning] Using a password on the command line interface can be insecure. WARNING: --ssl is deprecated and will be removed in a future version. Use --ssl-mode instead. +----------------------------+ | Tables_in_base_affiliation | +----------------------------+ | table_affiliation | | table_canalweb | | table_langue | | table_partenariat | | table_pays | +----------------------------+ Pour SSH : ssh -gNL 1080:mysql-base.alwaysdata.net:3306 utilisateur_de_ma_base@mysql-base.alwaysdata.net ssh: connect to host mysql-base.alwaysdata.net port 22: Network is unreachable zsh: exit 255 ssh -gNL 1080:mysql-base.alwaysdata.net:3306 utilisateur_de_ma_base@mysql-base.alwaysdata.net
Attachment:
signature.asc
Description: OpenPGP digital signature