mysql登录失败解决方案
报错内容
二进制安装mysql成功后,登录报如下错误
[root@rocky01 ~]# ss -ntl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 *:3306 *:*
[root@rocky01 ~]# mysql -uroot -p123456
mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
解决方案
注意:此方法存在可能存在风险
[root@rocky01 ~]# ln -s /usr/lib64/libtinfo.so.6.1 /usr/lib64/libtinfo.so.5
[root@rocky01 ~]#
[root@rocky01 ~]# mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.31 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>