二进制安装mysql 报error while loading shared libraries: libtinfo.so.5 解决办法
Posted y_zilong
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了二进制安装mysql 报error while loading shared libraries: libtinfo.so.5 解决办法相关的知识,希望对你有一定的参考价值。
mysql 采用的是 Linux- Generic 包安装,但是到了连接服务的时候却报错了
[root@cent8_yzil ~]# mysql -uroot -p'&PwwRouFA29l'
mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
解决方法:
ln -s /usr/lib64/libtinfo.so.6.1 /usr/lib64/libtinfo.so.5
[root@cent8_yzil ~]# mysql -uroot -p'&PwwRouFA29l'
mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
[root@cent8_yzil ~]# ln -s /usr/lib64/libtinfo.so.6.1 /usr/lib64/libtinfo.so.5
[root@cent8_yzil ~]# mysql -uroot -p'&PwwRouFA29l'
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.23
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>
mysql报服务启动没问题,查看状态起不来
[root@cent8_yzil ~]# systemctl start mysqld
[root@cent8_yzil ~]# systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/etc/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2021-05-11 20:54:42 EDT; 5s ago
Process: 3040 ExecStart=/app/mysql/bin/mysqld --defaults-file=/etc/my.cnf (code=exited, status=1/FAILURE)
Main PID: 3040 (code=exited, status=1/FAILURE)
May 11 20:54:42 cent8_yzil.example.com systemd[1]: Started MySQL Server.
May 11 20:54:42 cent8_yzil.example.com mysqld[3040]: mysqld: [Warning] World-writable config file '/etc/my.cnf' is ignored.
May 11 20:54:42 cent8_yzil.example.com mysqld[3040]: 2021-05-12T00:54:42.514402Z 0 [System] [MY-010116] [Server] /app/mysql/bin/mysqld (mysqld
May 11 20:54:42 cent8_yzil.example.com mysqld[3040]: 2021-05-12T00:54:42.631723Z 1 [ERROR] [MY-011011] [Server] Failed to find valid data direc
May 11 20:54:42 cent8_yzil.example.com mysqld[3040]: 2021-05-12T00:54:42.631947Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization
May 11 20:54:42 cent8_yzil.example.com mysqld[3040]: 2021-05-12T00:54:42.632020Z 0 [ERROR] [MY-010119] [Server] Aborting
May 11 20:54:42 cent8_yzil.example.com mysqld[3040]: 2021-05-12T00:54:42.634467Z 0 [System] [MY-010910] [Server] /app/mysql/bin/mysqld: Shutdow
May 11 20:54:42 cent8_yzil.example.com systemd[1]: mysqld.service: Main process exited, code=exited, status=1/FAILURE
May 11 20:54:42 cent8_yzil.example.com systemd[1]: mysqld.service: Failed with result 'exit-code'.
初始化有问题,在重新初始化
[root@cent8_yzil ~]# rm -rf /data/mysql/*
[root@cent8_yzil ~]# rm -rf /etc/my.cnf
[root@cent8_yzil ~]# mysqld --initialize --user=mysql --basedir=/app/mysql --datadir=/data/mysql
2021-05-12T00:59:27.901998Z 0 [System] [MY-013169] [Server] /app/mysql/bin/mysqld (mysqld 8.0.23) initializing of server in progress as process
2021-05-12T00:59:27.926549Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-05-12T00:59:28.691429Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-05-12T00:59:30.002641Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: )Ivmo3VcDIe.
[root@cent8_yzil ~]# vi /etc/my.cnf
[root@cent8_yzil ~]# systemctl enable mysqld
[root@cent8_yzil ~]# systemctl start mysqld
[root@cent8_yzil ~]# systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/etc/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2021-05-11 21:02:31 EDT; 4min 19s ago
Main PID: 3387 (mysqld)
Tasks: 38 (limit: 11251)
Memory: 348.3M
CGroup: /system.slice/mysqld.service
└─3387 /app/mysql/bin/mysqld --defaults-file=/etc/my.cnf
May 11 21:02:31 cent8_yzil.example.com systemd[1]: Started MySQL Server.
[root@cent8_yzil ~]#
以上是关于二进制安装mysql 报error while loading shared libraries: libtinfo.so.5 解决办法的主要内容,如果未能解决你的问题,请参考以下文章
canal启动报错ERROR c.a.o.canal.parse.inbound.mysql.dbsync.DirectLogFetcher - I/O error while reading fro
源码安装mysql5.6x启动报错:[ERROR] Can't find messagefile '/data/mysqldata/3306/english/errmsg.sys
Vue热更新报错(log.error('[WDS] Errors while compiling. Reload prevented.'))
error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or
关于eclipse安装spring插件报错An error occurred while collecting items to be installed...解决方案
Eclipse 安装插件报错:An error occurred while collecting items to be installed session context was...解决方法汇总