Monday 7 November 2016

mytop Can't load '/usr/lib64/perl5/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient

[root@garey-mysql2 ~]# mytop
install_driver(mysql) failed: Can't load '/usr/lib64/perl5/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.16: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200.
 at (eval 12) line 3
Compilation failed in require at (eval 12) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at /usr/bin/mytop line 235
 [root@garey-mysql2 ~]# yum install perl-DBD-MySQL
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos-hn.viettelidc.com.vn
 * epel: mirror.premi.st
 * extras: centos-hn.viettelidc.com.vn
 * updates: centos-hn.viettelidc.com.vn
Package perl-DBD-MySQL-4.013-3.el6.x86_64 already installed and latest version
Nothing to do
[root@garey-mysql2 ~]# rpm -qa | grep -i dbd
perl-DBD-MySQL-4.013-3.el6.x86_64
[root@garey-mysql2 ~]# rpm -e --nodeps perl-DBD-MySQL-4.013-3.el6.x86_64
[root@garey-mysql2 ~]# rpm -qa | grep dbd
[root@garey-mysql2 ~]# yum install perl-DBD-mysql

Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos-hn.viettelidc.com.vn
 * epel: mirror.premi.st
 * extras: centos-hn.viettelidc.com.vn
 * updates: centos-hn.viettelidc.com.vn
Resolving Dependencies
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: perl-DBD-MySQL-4.013-3.e                                                                                           l6.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.1.73-7.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================
 Package                        Arch                   Version                      Repository            Size
===============================================================================================================
Installing:
 perl-DBD-MySQL                 x86_64                 4.013-3.el6                  base                 134 k
Installing for dependencies:
 mysql-libs                     x86_64                 5.1.73-7.el6                 base                 1.2 M

Transaction Summary
===============================================================================================================
Install       2 Package(s)

Total download size: 1.4 M
Installed size: 4.4 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): mysql-libs-5.1.73-7.el6.x86_64.rpm                                                                                                                                          | 1.2 MB     00:00
(2/2): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm                                                                                                                                       | 134 kB     00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                      39 kB/s | 1.4 MB     00:35
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 4 pre-existing rpmdb problem(s), 'yum check' output follows:
mytop-1.7-3.b737f60.el6.noarch has missing requires of perl(DBD::mysql) >= ('0', '1', None)
2:postfix-2.6.6-6.el6_7.1.x86_64 has missing requires of libmysqlclient.so.16()(64bit)
2:postfix-2.6.6-6.el6_7.1.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit)
2:postfix-2.6.6-6.el6_7.1.x86_64 has missing requires of mysql-libs
  Installing : mysql-libs-5.1.73-7.el6.x86_64                                                                                                                                                         1/2
warning: /etc/my.cnf created as /etc/my.cnf.rpmnew
  Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                                                                                                                                                      2/2
  Verifying  : perl-DBD-MySQL-4.013-3.el6.x86_64                                                                                                                                                      1/2
  Verifying  : mysql-libs-5.1.73-7.el6.x86_64                                                                                                                                                         2/2

Installed:
  perl-DBD-MySQL.x86_64 0:4.013-3.el6

Dependency Installed:
  mysql-libs.x86_64 0:5.1.73-7.el6

Complete!

[root@garey-mysql2 ~]# rpm -qa | grep -i dbd
perl-DBD-MySQL-4.013-3.el6.x86_64

[root@garey-mysql2 ~]# mytop
MySQL on localhost (5.6.24-log)                                                                                                                                                   up 4+03:52:10 [15:38:39]
 Queries: 7.0    qps:    0 Slow:     0.0         Se/In/Up/De(%):    14/00/00/00

 Key Efficiency: 100.0%  Bps in/out:   0.0/  0.0

      Id      User         Host/IP         DB      Time    Cmd Query or State
       --      ----         -------         --      ----    --- ----------
        4      root       localhost       test         0  Query show full processlist
        1 system us                               359512 Connec Slave has read all relay log; waiting for the slave I/O thread to update it
        2 system us                               359513 Connec Connecting to master

Wednesday 12 October 2016

Tuesday 24 May 2016

conflicts with file from package MySQL




[root@garey-mysql1 local]# rpm -ivh MySQL-server-5.6.24-1.linux_glibc2.5.x86_64.rpm
Preparing...                ########################################### [100%]
        file /etc/init.d/mysql from install of MySQL-server-5.6.24-1.linux_glibc2.5.x86_64 conflicts with file from package Percona-Server-server-57-5.7.11-4.1.el6.x86_64
        file /etc/logrotate.d/mysql from install of MySQL-server-5.6.24-1.linux_glibc2.5.x86_64 conflicts with file from package Percona-Server-server-57-5.7.11-4.1.el6.x86_64
        。。。。。。。。。。。。。。。。。。。。。。
[root@garey-mysql1 local]# yum remove percona-server-server
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: percona-server-server
Loading mirror speeds from cached hostfile
 * base: mirror.digistar.vn
 * extras: centos.exabytes.com.my
 * updates: mirror.digistar.vn
base                                                                                                                                                                               | 3.7 kB     00:00
No Packages marked for removal
[root@garey-mysql1 local]# yum remove Percona-Server-server-57-5.7.11-4.1.el6.x86_64
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package Percona-Server-server-57.x86_64 0:5.7.11-4.1.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
 Package                                                 Arch                                  Version                                       Repository                                              Size
=======================================================================================
Removing:
 Percona-Server-server-57                                x86_64                                5.7.11-4.1.el6                                @percona-release-x86_64                                173 M

Transaction Summary
=======================================================================================
Remove        1 Package(s)
Installed size: 173 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
error reading information on service mysql: No such file or directory
error: %preun(Percona-Server-server-57-5.7.11-4.1.el6.x86_64) scriptlet failed, exit status 1
Error in PREUN scriptlet in rpm package Percona-Server-server-57
Percona-Server-server-57-5.7.11-4.1.el6.x86_64 was supposed to be removed but is not!
  Verifying  : Percona-Server-server-57-5.7.11-4.1.el6.x86_64                                                                                                                                         1/1
Failed:
  Percona-Server-server-57.x86_64 0:5.7.11-4.1.el6
Complete!
[root@garey-mysql1 local]# rpm -qa | grep percona
percona-release-0.1-3.noarch
[root@garey-mysql1 local]# rpm -e --noscripts percona-release-0.1-3.noarch
[root@garey-mysql1 local]# rpm -qa | grep percona-server-server
[root@garey-mysql1 local]# rpm -qa | grep -i percona-server-server
Percona-Server-server-57-5.7.11-4.1.el6.x86_64
[root@garey-mysql1 local]# rpm -e --noscripts Percona-Server-server-57-5.7.11-4.1.el6.x86_64
[root@garey-mysql1 local]# rpm -qa | grep -i percona-server-server

[root@garey-mysql1 local]# rpm -ivh MySQL-server-5.6.24-1.linux_glibc2.5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]
2016-05-24 11:15:17 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-05-24 11:15:17 0 [Note] /usr/sbin/mysqld (mysqld 5.6.24) starting as process 4675 ...
A random root password has been set. You will find it in '/root/.mysql_secret'.
2016-05-24 11:15:26 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-05-24 11:15:26 0 [Note] /usr/sbin/mysqld (mysqld 5.6.24) starting as process 4697 ...
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
--defaults-file argument to mysqld_safe when starting the server
[root@garey-mysql1 local]# ls -lah
total 107M
drwxr-xr-x.  2 root root 4.0K Sep 23  2011 lib
-rw-r--r--.  1 root root  22M Mar 26  2015 MySQL-client-5.6.24-1.linux_glibc2.5.x86_64.rpm
-rw-r--r--.  1 root root  85M Mar 26  2015 MySQL-server-5.6.24-1.linux_glibc2.5.x86_64.rpm
 [root@garey-mysql1 local]# rpm -ivh MySQL-client-5.6.24-1.linux_glibc2.5.x86_64.rpm
Preparing...                ########################################### [100%]
        file /usr/bin/mysql from install of MySQL-client-5.6.24-1.linux_glibc2.5.x86_64 conflicts with file from package Percona-Server-client-57-5.7.11-4.1.el6.x86_64
        file /usr/bin/mysql_config_editor from install of MySQL-client-5.6.24-1.linux_glibc2.5.x86_64 conflicts with file from package Percona-Server-client-57-5.7.11-4.1.el6.x86_64        。。。。。。。。。。。。。。。。。。
[root@garey-mysql1 local]# rpm -qa | grep -i Percona-Server-client
Percona-Server-client-57-5.7.11-4.1.el6.x86_64
[root@garey-mysql1 local]# rpm -e --noscripts Percona-Server-client-57-5.7.11-4.1.el6.x86_64
[root@garey-mysql1 local]# rpm -qa | grep -i Percona-Server-client
[root@garey-mysql1 local]# rpm -ivh MySQL-client-5.6.24-1.linux_glibc2.5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:MySQL-client           ########################################### [100%]
[root@garey-mysql1 local]# rpm -ivh MySQL-shared-compat-5.6.24-1.linux_glibc2.5.x86_64.rpm
Preparing...                ########################################### [100%]
        file /usr/lib64/libmysqlclient.so.16.0.0 from install of MySQL-shared-compat-5.6.24-1.linux_glibc2.5.x86_64 conflicts with file from package Percona-Server-shared-51-5.1.73-rel14.12.625.rhel6.x86_64
        file /usr/lib64/libmysqlclient_r.so.16.0.0 from install of MySQL-shared-compat-5.6.24-1.linux_glibc2.5.x86_64 conflicts with file from package Percona-Server-shared-51-5.1.73-rel14.12.625.rhel6.x86_64
[root@garey-mysql1 local]# rpm -e Percona-Server-shared-51-5.1.73-rel14.12.625.rhel6.x86_64
error: Failed dependencies:
        libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-6.el6_7.1.x86_64
        libmysqlclient.so.16()(64bit) is needed by (installed) perl-DBD-MySQL-4.013-3.el6.x86_64
        libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-6.el6_7.1.x86_64
        libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) perl-DBD-MySQL-4.013-3.el6.x86_64
        mysql-libs is needed by (installed) postfix-2:2.6.6-6.el6_7.1.x86_64
 [root@garey-mysql1 local]# rpm -e --nodeps Percona-Server-shared-51-5.1.73-rel14.12.625.rhel6.x86_64
[root@garey-mysql1 local]# service mysql start
Starting MySQL. ERROR! The server quit without updating PID file (/var/run/mysqld/mysqld.pid).
[root@garey-mysql1 log]# tail -n 20 mysqld.log
2016-05-24 12:06:38 5317 [Note] InnoDB: Highest supported file format is Barracuda.
2016-05-24 12:06:38 5317 [Note] InnoDB: 128 rollback segment(s) are active.
2016-05-24 12:06:38 5317 [Note] InnoDB: Waiting for purge to start
2016-05-24 12:06:38 5317 [Note] InnoDB: 5.6.24 started; log sequence number 1625987
2016-05-24 12:06:38 5317 [Note] Server hostname (bind-address): '*'; port: 3306
2016-05-24 12:06:38 5317 [Note] IPv6 is available.
2016-05-24 12:06:38 5317 [Note]   - '::' resolves to '::';
2016-05-24 12:06:38 5317 [Note] Server socket created on IP: '::'.
2016-05-24 12:06:38 5317 [ERROR] /usr/sbin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2 - No such file or directory)
2016-05-24 12:06:38 5317 [ERROR] Can't start server: can't create PID file: No such file or directory
160524 12:06:38 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
[root@garey-mysql1 log]# chown mysql:mysql /var/run/mysqld
chown: cannot access `/var/run/mysqld': No such file or directory
[root@garey-mysql1 log]# cd /var/run/
[root@garey-mysql1 run]# mkdir mysqld
[root@garey-mysql1 run]# chown mysql:mysql /var/run/mysqld
[root@garey-mysql1 run]# ls -lah
total 72K
drwxr-xr-x. 12 root  root  4.0K May 24 12:11 .
drwxr-xr-x. 18 root  root  4.0K May 23 18:32 ..
-rw-r--r--.  1 root  root     5 May 23 16:55 auditd.pid
drwxr-xr-x.  2 mysql mysql 4.0K May 24 12:11 mysqld
drwxrwxr-x.  2 root  root  4.0K May  4 03:23 netreport
[root@garey-mysql1 run]# service mysql start
Starting MySQL. SUCCESS!