Saturday, August 10, 2013

Troubleshooting missing lib in CENTOS 6 (RHEL compatible)

Error message:

[mysql@rh6 mysql]$ ./support-files/binary-configure
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!

To help you a bit, I am now going to create the needed MySQL databases
and start the MySQL server for you.  If you run into any trouble, please
consult the MySQL manual, that you can find in the Docs directory.

WARNING: The host 'rh6.dbaglobe.com' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
./bin/mysqld: error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory

Find the right package:
[mysql@rh6 mysql]$ yum whatprovides libssl.so.6
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
* base: mirror.rndc.or.id
* extras: mirror.upsi.edu.my
* rpmforge: repoforge.spinellicreations.com
* updates: centosx4.centos.org
openssl098e-0.9.8e-17.el6.centos.2.i686 : A compatibility version of a general cryptography and TLS library
Repo        : base
Matched from:
Other       : libssl.so.6

Take note that for x64 server, page “openssl098e-0.9.8e-17.el6.centos.2.x86_64” shall be installed

Reset root password for mysql

Session 1:
[mysql@rh6 mysql]$ /lab/mysql/mysql-server/mysql/bin/mysqld --no-defaults --basedir=/lab/mysql/mysql-server/mysql  --skip-grant-tables
130810  2:42:53 [Note] Plugin 'FEDERATED' is disabled.
130810  2:42:53 InnoDB: The InnoDB memory heap is disabled
130810  2:42:53 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130810  2:42:53 InnoDB: Compressed tables use zlib 1.2.3
130810  2:42:53 InnoDB: Using Linux native AIO
130810  2:42:53 InnoDB: Initializing buffer pool, size = 128.0M
130810  2:42:53 InnoDB: Completed initialization of buffer pool
130810  2:42:53 InnoDB: highest supported file format is Barracuda.
130810  2:42:53  InnoDB: Waiting for the background threads to start
130810  2:42:54 Percona XtraDB (http://www.percona.com) 5.5.32-rel31.0 started; log sequence number 1597945
130810  2:42:54 [Note] /lab/mysql/mysql-server/mysql/bin/mysqld: ready for connections.
Version: '5.5.32-rel31.0'  socket: '/tmp/mysql.sock'  port: 3306  Percona Server with XtraDB (GPL), Release rel31.0, Revision 549

Session 2:
[mysql@rh6 ~]$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.32-rel31.0 Percona Server with XtraDB (GPL), Release rel31.0, Revision 549

Copyright (c) 2009-2013 Percona Ireland Ltd.
Copyright (c) 2000, 2013, 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 '\h' for help. Type '\c' to clear the current input statement.

mysql> UPDATE mysql.user SET Password=PASSWORD('masked_my_password')  WHERE User='root';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3  Changed: 3  Warnings: 0

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)