Chinaunix首页 | 论坛 | 博客
  • 博客访问: 367799
  • 博文数量: 190
  • 博客积分: 50
  • 博客等级: 民兵
  • 技术积分: 125
  • 用 户 组: 普通用户
  • 注册时间: 2013-01-12 14:05
文章分类

全部博文(190)

文章存档

2013年(190)

我的朋友

分类: Mysql/postgreSQL

2013-05-14 14:42:16

今天从db01上copy复制一个mysql库到db02上,前面操作已经顺利。数据库也可以正常启动。本以为ok了,结果在执行命令登录mysql库时,报如下错误:


 

点击(此处)折叠或打开

  1. [root@db02 ~]# mysql3306
  2. /data/mysql-3306/bin/mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory



解决方法:
1.从db01好用的一台mysql服务器上,将两个lib包拷贝到db02相应路径:

点击(此处)折叠或打开

  1. [root@fz-db01 ~]# scp -r /lib/libtinfo.so.5.7 192.168.1.2:/lib/
  2. libtinfo.so.5.7 100% 96KB 95.8KB/s 00:00
  3. [root@fz-db01 ~]# scp -r /lib64/libtinfo.so.5.7 192.168.1.2:/lib64/
  4. libtinfo.so.5.7 100% 135KB 135.0KB/s 00:00


 
2.在db02上创建相应的软链接:

点击(此处)折叠或打开

  1. [root@db02 ~]# ln -sn /lib/libtinfo.so.5.7 /lib/libtinfo.so.5
  2. [root@db02 ~]# ln -sn /lib64/libtinfo.so.5.7 /lib64/libtinfo.so.5


3.再次执行连接命令进行测试如下:


 

点击(此处)折叠或打开

  1. [root@db02 ~]# mysql3306
  2. Welcome to the MySQL monitor. Commands end with ; or \g.
  3. Your MySQL connection id is 7
  4. Server version: 5.5.21-log Source distribution
  5. Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  6. Oracle is a registered trademark of Oracle Corporation and/or its
  7. affiliates. Other names may be trademarks of their respective
  8. owners.
  9. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  10. mysql> quit
  11. Bye


本来是一个很简单的问题,从网上下载lib包啥的,查资料愣是折腾了好半天;其实,回头认真思考一下,就很容易想到可以从好用的那台mysql库入手,将问题解决掉的。简单记录下来,留做备忘吧!

阅读(2711) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~