mysql shell can't connect to local Percona Server 5.7

Hello,

I am doing preparation for upgrade Percona MySQL 5.7 to Percona MySQL 8.0. I notice that MySQL shell provides a convenient way to check any upgrade issues. I downloaded and installed mysql-shell-8.0.9 on my local mysql server. However, I couldn’t connect to Percona mysql. I tried two different ways, below are errors:

OS:
$ cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)

MySQL:
Server version: 5.7.24-26-log Percona Server (GPL), Release 26, Revision c8fe767

  1. yum install -y mysql-shell-8.0.19-1.el7.x86_64.rpm as root
    $ mysqlsh user1@localhost:3306
    Please provide the password for ‘user1@localhost:3306’: **************
    MySQL Shell 8.0.19

Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.

Type ‘\help’ or ‘?’ for help; ‘\quit’ to exit.
Creating a session to ‘user1@localhost:3306’
MySQL Error 2059 (HY000): Authentication plugin ‘dialog’ cannot be loaded: Incompatible client plugin interface

  1. Untar mysql-shell-8.0.19-linux-glibc2.12-x86-64bit.tar.gz
    cd mysql-shell-8.0.19-linux-glibc2.12-x86-64bit/bin
    $ ./mysqlsh user1@localhost:3306
    Please provide the password for ‘user1@localhost:3306’: **************
    MySQL Shell 8.0.19

Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.

Type ‘\help’ or ‘?’ for help; ‘\quit’ to exit.
Creating a session to ‘user1@localhost:3306’
MySQL Error 2059 (HY000): Authentication plugin ‘dialog’ cannot be loaded: /usr/local/mysql/lib/plugin/dialog.so: cannot open shared object file: No such file or directory

I know the login-dir is not correct, but I don’t know how to tell mysqlsh where to look for (doesn’t seem like there is an option).

Does anyone have similar errors? Is that because mysql shell is not compatible with Percona server (one article says it should work on Percona server)? If anyone knows how to use mysql shell on Percona server, I’d really appreciate if you can share with me.

Thanks,
Jie

1 Like

I meant to say plugin-dir, not login-dir in my previous post.

1 Like

I’ve found that you must instruct mariadb to favor the mysql_clear_password plugin in order to maintain compatibility with mysql clients that don’t support the dialog.so plugin.

To do so, you must set pam_use_cleartext_plugin in the [mariadb] block of my.cnf

This is explained at Authentication Plugin - PAM - MariaDB Knowledge Base

1 Like