Bug #72926 MySQL-server RPM does not install perl-Data-Dumper as a dependency
Submitted: 10 Jun 2014 5:05 Modified: 3 Aug 2018 15:22
Reporter: Daming Fu Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.6.16 OS:Linux (Any RHEL-derived)
Assigned to: CPU Architecture:Any

[10 Jun 2014 5:05] Daming Fu
Description:
MySQL-server requires perl-Data-Dumper to function. However, perl-Data-Dumper is not listed by the MySQL-server RPM as a dependency. So if a linux server does not have perl-Data-Dumper installed, the install-mysql-db will fail. And because of missing the initial database, the mysql service could not be started.

How to repeat:
On a linux server, make sure there is no perl-Data-Dumper installed. Install MySQL-server using yum. There should be error message complaining database could not be created.

Suggested fix:
Add perl-Data-Dumper as a dependency of the RPM package
[10 Jun 2014 7:59] MySQL Verification Team
Hello Daming,

Thank you for the report.
I just tried with latest yum repo and didn't see this issue. 

Could you please confirm with 5.6.19?

// Uninstalled Data::Dumper

CPAN Terminal> u Data::Dumper

This will uninstall the following modules:
    Data::Dumper

Note that if you installed them via a package manager, you probably
should use the same package manager to uninstall them

Are you sure you want to continue? [y/N]: y
Uninstalling 'Data::Dumper'
Module 'Data::Dumper' uninstalled successfully
All modules uninstalled successfully

// Installed mysql using yum repo

[root@cluster-repo ushastry]# yum install mysql-community-server
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:5.6.19-2.el6 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 5.6.19-2.el6 for package: mysql-community-server-5.6.19-2.el6.x86_64
--> Processing Dependency: mysql-community-client(x86-64) = 5.6.19-2.el6 for package: mysql-community-server-5.6.19-2.el6.x86_64
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.6.19-2.el6 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) = 5.6.19-2.el6 for package: mysql-community-client-5.6.19-2.el6.x86_64
---> Package mysql-community-common.x86_64 0:5.6.19-2.el6 will be installed
--> Running transaction check
---> Package mysql-community-libs.x86_64 0:5.6.19-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================
 Package                                            Arch                               Version                                  Repository                               Size
==============================================================================================================================================================================
Installing:
 mysql-community-server                             x86_64                             5.6.19-2.el6                             ol6_MySQL56                              52 M
Installing for dependencies:
 mysql-community-client                             x86_64                             5.6.19-2.el6                             ol6_MySQL56                              18 M
 mysql-community-common                             x86_64                             5.6.19-2.el6                             ol6_MySQL56                             299 k
 mysql-community-libs                               x86_64                             5.6.19-2.el6                             ol6_MySQL56                             1.9 M

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

Total download size: 72 M
Installed size: 323 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): mysql-community-client-5.6.19-2.el6.x86_64.rpm                                                                                                  |  18 MB     01:58
(2/4): mysql-community-common-5.6.19-2.el6.x86_64.rpm                                                                                                  | 299 kB     00:01
(3/4): mysql-community-libs-5.6.19-2.el6.x86_64.rpm                                                                                                    | 1.9 MB     00:09
(4/4): mysql-community-server-5.6.19-2.el6.x86_64.rpm                                                                                                  |  52 MB     04:27
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                         184 kB/s |  72 MB     06:37
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 7 pre-existing rpmdb problem(s), 'yum check' output follows:
perl-DBD-MySQL-4.013-3.el6.x86_64 has missing requires of libmysqlclient.so.16()(64bit)
perl-DBD-MySQL-4.013-3.el6.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit)
php-mysql-5.3.3-27.el6_5.x86_64 has missing requires of libmysqlclient.so.16()(64bit)
php-mysql-5.3.3-27.el6_5.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit)
2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of libmysqlclient.so.16()(64bit)
2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit)
2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of mysql-libs
  Installing : mysql-community-common-5.6.19-2.el6.x86_64                                                                                                                 1/4
  Installing : mysql-community-libs-5.6.19-2.el6.x86_64                                                                                                                   2/4
  Installing : mysql-community-client-5.6.19-2.el6.x86_64                                                                                                                 3/4
  Installing : mysql-community-server-5.6.19-2.el6.x86_64                                                                                                                 4/4
  Verifying  : mysql-community-common-5.6.19-2.el6.x86_64                                                                                                                 1/4
  Verifying  : mysql-community-libs-5.6.19-2.el6.x86_64                                                                                                                   2/4
  Verifying  : mysql-community-client-5.6.19-2.el6.x86_64                                                                                                                 3/4
  Verifying  : mysql-community-server-5.6.19-2.el6.x86_64                                                                                                                 4/4

Installed:
  mysql-community-server.x86_64 0:5.6.19-2.el6

Dependency Installed:
  mysql-community-client.x86_64 0:5.6.19-2.el6              mysql-community-common.x86_64 0:5.6.19-2.el6              mysql-community-libs.x86_64 0:5.6.19-2.el6

Complete!

// Installed the MySQL data directory and created the system tables

 mysql_install_db --basedir=/usr --datadir=/var/lib/mysql/ --user=root
..
Confirmed that files are created

ls -l /var/lib/mysql/mysql

 /etc/init.d/mysqld start
Starting mysqld:                                           [  OK  ]
=================

Thanks,
Umesh
[11 Jun 2014 0:10] Daming Fu
Hi,

It's MySQL-server-5.6.16-1.el6.x86_64 , not community server.
The OS is Amazon Linux AMI x86_64 PV EBS.

Cheers,

Daming
[13 Jun 2014 10:06] MySQL Verification Team
I could not see this issue with latest enterprise rpm's too, could you please confirm with the latest GA version i.e with 5.6.19?

// With the enterprise

// Removed Data::Dumper module

CPAN Terminal> u Data::Dumper

This will uninstall the following modules:
    Data::Dumper

Note that if you installed them via a package manager, you probably
should use the same package manager to uninstall them

Are you sure you want to continue? [y/N]: y
Uninstalling 'Data::Dumper'
Module 'Data::Dumper' uninstalled successfully
All modules uninstalled successfully

// Downloaded latest enterprise RPMs, installed

[root@cluster-repo downloads]# ls -l *.rpm
-rw-r--r-- 1 7155 wheel  23076203 May  8 13:47 MySQL-client-5.6.19-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 7155 wheel   4564195 May  8 13:47 MySQL-devel-5.6.19-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 7155 wheel 114294105 May  8 13:47 MySQL-embedded-5.6.19-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 7155 wheel  87012798 May  8 13:48 MySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 7155 wheel   2400193 May  8 13:49 MySQL-shared-5.6.19-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 7155 wheel   5180638 May  8 13:49 MySQL-shared-compat-5.6.19-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 7155 wheel  73600679 May  8 13:49 MySQL-test-5.6.19-1.linux_glibc2.5.x86_64.rpm

[root@cluster-repo downloads]# rpm -ivh MySQL*.rpm
Preparing...                ########################################### [100%]
   1:MySQL-devel            ########################################### [ 14%]
   2:MySQL-client           ########################################### [ 29%]
   3:MySQL-test             ########################################### [ 43%]
   4:MySQL-embedded         ########################################### [ 57%]
   5:MySQL-shared-compat    ########################################### [ 71%]
   6:MySQL-shared           ########################################### [ 86%]
   7:MySQL-server           ########################################### [100%]

// Not seeing any Data::Dumper dependency which was seen in community rpm's when installed through yum repo

[root@cluster-repo downloads]# rpm -q --requires MySQL-server-5.6.19-1.linux_glibc2.5.x86_64
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/sbin/chkconfig
/usr/bin/perl
/usr/sbin/groupadd
/usr/sbin/useradd
config(MySQL-server) = 5.6.19-1.linux_glibc2.5
coreutils
grep
libaio.so.1()(64bit)
libaio.so.1(LIBAIO_0.1)(64bit)
libaio.so.1(LIBAIO_0.4)(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libcrypt.so.1()(64bit)
libcrypt.so.1(GLIBC_2.2.5)(64bit)
libdl.so.2()(64bit)
libdl.so.2(GLIBC_2.2.5)(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libm.so.6()(64bit)
libm.so.6(GLIBC_2.2.5)(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libpthread.so.0(GLIBC_2.3.2)(64bit)
librt.so.1()(64bit)
librt.so.1(GLIBC_2.2.5)(64bit)
libstdc++.so.6()(64bit)
libstdc++.so.6(CXXABI_1.3)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
procps
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1
rtld(GNU_HASH)

// Removed old datadir, Create new datadir

[root@cluster-repo downloads]# rm -rf /var/lib/mysql/ 

[root@cluster-repo downloads]# mysql_install_db --basedir=/usr --datadir=/var/lib/mysql/ --user=mysql

// Confirmed that datadir is created

[root@cluster-repo downloads]# ls -l /var/lib/mysql/
total 110616
-rw-rw---- 1 mysql mysql       56 Jun 15 06:11 auto.cnf
-rw-r----- 1 mysql root      1974 Jun 15 06:11 cluster-repo.err
-rw-rw---- 1 mysql mysql        6 Jun 15 06:11 cluster-repo.pid
-rw-rw---- 1 mysql mysql 12582912 Jun 15 06:11 ibdata1
-rw-rw---- 1 mysql mysql 50331648 Jun 15 06:11 ib_logfile0
-rw-rw---- 1 mysql mysql 50331648 Jun 15 06:11 ib_logfile1
drwx------ 2 mysql mysql     4096 Jun 15 06:11 mysql
srwxrwxrwx 1 mysql mysql        0 Jun 15 06:11 mysql.sock
drwx------ 2 mysql mysql     4096 Jun 15 06:11 performance_schema
drwx------ 2 mysql mysql     4096 Jun 15 06:11 test

// Starting mysqld

[root@cluster-repo downloads]# /etc/init.d/mysql start
Starting MySQL..                                           [  OK  ]
[13 Jun 2014 10:09] MySQL Verification Team
Also, when I compare 5.6.19 and 5.6.17 for mysql_install_db script:

[root@cluster-repo downloads]# diff /usr/bin/mysql_install_db /data/ushastry/server/mysql-5.6.17/scripts/mysql_install_db
..
36a37,42
> use Fcntl;
> use File::Basename;
> use File::Copy;
> use Getopt::Long;
> use Sys::Hostname;
> use Data::Dumper;
38,67d43
< use warnings;

Better if you can confirm if this is still issue at your end for 5.6.19?
[14 Jul 2014 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[3 Mar 2016 12:46] Steve Moss
This is affecting me too:

Installing MySQL-server-advanced version 5.6.27-1.el7.

MySQL server installs, but the service fails to start as it can't find the necessary tables.

> 2016-03-03 12:44:58 1635 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
> 160303 12:44:58 mysqld_safe mysqld from pid file /opt/mysql/data/slinky-devhost.pid ended

This is because mysql_install_db can't run to create the initial db structure.

> # mysql_install_db
> FATAL ERROR: please install the following Perl modules before executing /bin/mysql_install_db:
> Data::Dumper

I'm running on CentOS Linux release 7.2.1511 (Core).
[10 Apr 2018 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[7 Jun 2018 0:58] MySQL Verification Team
Verified this is still the case with MySQL 5.6.40 on any bare-bones RHEL-derived install e.g. the "centos/7" vagrant box.

yum install MySQL-{client,server,shared}*
...
Install  4 Packages (+28 Dependent packages)
...
warning: user mysql does not exist - using root
warning: group mysql does not exist - using root
warning: user mysql does not exist - using root
warning: group mysql does not exist - using root
FATAL ERROR: please install the following Perl modules before executing /usr/bin/mysql_install_db:
Data::Dumper
...
[3 Aug 2018 15:22] Paul DuBois
Posted by developer:
 
Fixed in 5.5.62, 5.6.42, 5.7.24, 8.0.13.

MySQL Server and test RPM packages were missing perl-Data-Dumper as a
dependency.