释放双眼,带上耳机,听听看~!
🤖 由 ChatGPT 生成的文章摘要
mysql client连接数据库报错日志如下
[root@abcdocker mysql-5.7.36-linux-glibc2.12-x86_64]# ./bin/mysql -uroot -p -h 10.102.xx.xxx
./bin/mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
解决办法
[root@abcdocker mysql-5.7.36-linux-glibc2.12-x86_64]# ln -s /usr/lib64/libncurses.so.6 /usr/lib64/libncurses.so.5
继续执行发现libtinfo.so.5
模块也没有
[root@abcdockermysql-5.7.36-linux-glibc2.12-x86_64]# ./bin/mysql -uroot -p -h 10.102.xx.xx
./bin/mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
同样给libtinfo 模块也添加一下
[root@abcdocker mysql-5.7.36-linux-glibc2.12-x86_64]# ln -s /usr/lib64/libncurses.so.6 /usr/lib64/libtinfo.so.5
最后执行mysql命令
[root@abcdocker mysql-5.7.36-linux-glibc2.12-x86_64]# ./bin/mysql -uroot -p -h 10.102.xx.xx
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 122009
Server version: 8.0.31 MySQL Community Server - GPL
Copyright (c) 2000, 2021, 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>