CentOS 7 Installing MySQL 5.6 A summary of the various problems encountered _linux

Source: Internet
Author: User
Tags uuid centos install perl

The following error occurred while installing MySQL 5.6 (5.6.19 mysql Community server) on a test server (CentOS Linux release 7.2.1511) because CentOS The default database for 7 is no longer MySQL, but mariadb. MySQL installed MySQL Lib library and mariadb Library, package conflicts, as shown in the following details (omitted a large number of logs)

[root@azrlnx06 tmp]# RPM-IVH mysql-server-advanced-5.6.20-1.rhel5.x86_64.rpm preparing ... ######################### ######## [100%] File/usr/share/mysql/czech/errmsg.sys from install of mysql-server-advanced-5.6.20-1.rhel5.x86_64 Conflicts with file from package mariadb-libs-1:5.5.50-1.el7_2.x86_64 File/usr/share/mysql/danish/errmsg.sys from Install of mysql-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with file from package mariadb-libs-1:5.5.50-1.el7_2. x86_64 File/usr/share/mysql/dutch/errmsg.sys from install of mysql-server-advanced-5.6.20-1.rhel5.x86_64 conflicts With file from package mariadb-libs-1:5.5.50-1.el7_2.x86_64 File/usr/share/mysql/english/errmsg.sys from Install of
mysql-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with file from package mariadb-libs-1:5.5.50-1.el7_2.x86_64 File/usr/share/mysql/estonian/errmsg.sys from install to mysql-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with File from Package mariadb-libs-1:5.5.50-1.el7_2.x86_64 File/usr/share/mysql/french/errmsg.sys from install to mysql-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with file from package mariadb-libs-1:5.5.50-1.el7_2.x86_64 File/usr/share/mysql/german/errmsg.sys from Install
mysql-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with file from package mariadb-libs-1:5.5.50-1.el7_2.x86_64 File/usr/share/mysql/greek/errmsg.sys from install of mysql-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with file
From Package mariadb-libs-1:5.5.50-1.el7_2.x86_64 ......................................................................................................................... ... file/usr/share/mysql/charsets/macroman.xml from install---------------------------------
mysql-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with file from package mariadb-libs-1:5.5.50-1.el7_2.x86_64 File/usr/share/mysql/charsets/swe7.xml from install to mysql-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with File from Package mariadb-libs-1:5.5.50-1.el7_2.x86_64 

Check for the presence of MARIADB related components, and then delete the MARIADB related components. As shown below:

[root@azrlnx06 mysql]# more/etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 
[root@azrlnx06 mysql]# rpm -qa |grep mariadb
mariadb-libs-5.5.50-1.el7_2.x86_64 [root@azrlnx06-mysql]# rpm-e mariadb-libs-5.5.50-1.el7
_2.x86_64
error:failed dependencies:
libmysqlclient.so.18 () (64bit) is needed by (installed) postfix-2 : 2.10.1-6.el7.x86_64
libmysqlclient.so.18 (libmysqlclient_18) (64bit) is needed by (installed) postfix-2 : 2.10.1-6.el7.x86_64
[root@azrlnx06 mysql]# rpm-e mariadb-libs-5.5.50-1.el7_2.x86_64--nodeps

Of course, when you encounter a dependency error while deleting the mariadb-libs-5.5.50-1.el7_2.x86_64 component, you are forced to delete the component, preferably using Yum to remove MARIADB related components. Then, when you reinstall MySQL, you encounter a "Error:mysql-server-advanced-5.6.20-1.rhel5.x86_64:install failed" error, as follows:

[root@azrlnx06 mysql]# cd/tmp
[root@azrlnx06 tmp]# ls
hsperfdata_azrlnx06 jirasetup mysql-server-advanced-5.6.20-1.rhel5.x86_64.rpm
[root@azrlnx06 tmp]# RPM-IVH mysql-server-advanced-5.6.20-1.rhel5.x86_64.rpm 
Preparing ... ################################# [100%]
updating/installing ... 1:mysql-server-advanced-5.6.20-1.rh################################# [100%]
error:unpacking of archive failed On File/usr/bin/innochecksum;582535c8:cpio:read failed-no such file or directory
error:mysql-server-advanced-5.6 .20-1.rhel5.x86_64:install failed
[root@azrlnx06 tmp]# 
clip_image001

A little confusing about this error, after uninstalling the MySQL-related components, reinstalling MySQL and finding Perl-related modules missing. As shown below:

[root@azrlnx06 jirasetup]# rpm-ivh mysql-server-advanced-5.6.20-1.rhel5.x86_64.rpm 
Preparing ... ############## ################### [100%]
updating/installing ...
1:mysql-server-advanced-5.6.20-1.rh################################# [100%]
FATAL error:please Install the Following Perl modules before executing/usr/bin/mysql_install_db:
Data::D umper

Use Yum to install Perl Perl-devel related packages (note: When MySQL is installed here, there is no output to install related detail information, because the Perl-related modules are not installed, and the installation Perl-data-dumper is missing)

[root@azrlnx06 jirasetup]# yum install-y perl perl-devel

After installing the Perl-related components, reinstall MySQL, as shown below, the installation was successful, but there was no information on the installation of the associated detail (because no perl-data-dumper was installed), start the MySQL error

root@azrlnx06 jirasetup]# rpm-ivh mysql-server-advanced-5.6.20-1.rhel5.x86_64.rpm 
Preparing ... ############### ################## [100%]
updating/installing ...
1:mysql-server-advanced-5.6.20-1.rh################################# [100%]
[root@azrlnx06 jirasetup]# rpm- IVH mysql-client-advanced-5.6.20-1.rhel5.x86_64.rpm 
Preparing ... ################################# [100%]
updating/installing
... 1:mysql-client-advanced-5.6.20-1.rh################################# [100%]
[root@azrlnx06 ~]# service MySQL Start starting MySQL .......
error! The server quit without updating PID file (/var/lib/mysql/azrlnx06.pid).
[Root@azrlnx06 ~]#

Locate the MySQL error log, and then check the/var/lib/mysql/azrlnx06.err error log for the following error message:

[root@azrlnx06 mysql]# Find/-name *.err/var/lib/mysql/azrlnx06.err/var/log/azure/ Microsoft.ostcextensions.linuxdiagnostic/2.3.9011/mdsd.err/var/log/azure/ Microsoft.ostcextensions.linuxdiagnostic/2.3.9013/mdsd.err/var/log/mdsd/mdsd.err [root@azrlnx06 mysql]# more/var/ Lib/mysql/azrlnx06.err 161111 03:28:25 Mysqld_safe starting mysqld daemon with databases From/var/lib/mysql 2016-11-11 03 : 28:25 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated.
Please use--explicit_defaults_for_timestamp server option (the documentation for more details).
2016-11-11 03:28:25 2144 [note] Plugin ' federated ' is disabled. /usr/sbin/mysqld:table ' mysql.plugin ' doesn ' t exist 2016-11-11 03:28:25 [ERROR] Can ' t open the 2144 Table.
Please run Mysql_upgrade to create it. 2016-11-11 03:28:25 2144 [note] innodb:using Atomics to ref count buffer pool pages 2016-11-11 03:28:25 2144 [note] Innod B:the InnoDB Memory heap is disabled 2016-11-11 03:28:25 2144 [note] Innodb:mutexesD rw_locks use GCC atomic builtins 2016-11-11 03:28:25 2144 [note] innodb:memory barrier-not used 2016-11-11 03:28:25 2144 [note] innodb:compressed tables with zlib 1.2.3 2016-11-11 03:28:25 2144 [note] innodb:using Linux native AIO 2016-1  1-11 03:28:25 2144 [note] innodb:using CPU CRC32 instructions 2016-11-11 03:28:25 2144 [note] innodb:initializing buffer Pool, size = 128.0M 2016-11-11 03:28:25 2144 [note] innodb:completed initialization of buffer pool 2016-11-11 03:28:25 2
144 [note] innodb:the the "specified" of the data file./ibdata1 did not exist:a the new database to be created! 2016-11-11 03:28:25 2144 [note] innodb:setting file./ibdata1 size to MB 2016-11-11 03:28:25 2144 [note] Innodb:datab
ASE physically writes the file full:wait ... 2016-11-11 03:28:26 2144 [note] innodb:setting log file./ib_logfile101 size to MB 2016-11-11 03:28:31 2144 [note] Inn odb:setting log file./ib_logfile1 size to MB 2016-11-11 03:28:37 2144 [note] innodb:renaming log file./ib_logfile101 to./ib_logfile0 2016-11-11 03:28:37 2144 [Warning] innodb:new log files created, lsn=45781 2016-11-11 03:28:37 2144 [Note] Innodb:doublewrite Buffer not found:creating new 2016-11-11 03:28:37 2144 [note] Innodb:doublewrite buffer created 2016
-11-11 03:28:37 2144 [note] innodb:128 rollback segment (s) are active.
2016-11-11 03:28:37 2144 [Warning] innodb:creating FOREIGN KEY constraint system tables. 2016-11-11 03:28:37 2144 [note] innodb:foreign key constraint system tables created 2016-11-11-03:28:37 2144 [note] Innod
B:creating tablespace and datafile system tables.
2016-11-11 03:28:38 2144 [note] innodb:tablespace and datafile system tables created.  2016-11-11 03:28:38 2144 [note] innodb:waiting for purge to start 2016-11-11 03:28:38 2144 [note] innodb:5.6.20 started; Log sequence number 0 2016-11-11 03:28:38 2144 [Warning] No existing UUID has been found, so we assume which is the F Irst time is this server has been started. Generating a new uuid:ef3b0cd5-a7be-11e6-98b3-000d3a8062fe. 2016-11-11 03:28:38 2144 [note] RSA private key file not found:/var/lib/mysql//private_key.pem.
Some Authentication plugins is not work. 2016-11-11 03:28:38 2144 [note] The RSA public key file is not found:/var/lib/mysql//public_key.pem.
Some Authentication plugins is not work. 2016-11-11 03:28:38 2144 [note] Server hostname (bind-address): ' * ';
port:3306 2016-11-11 03:28:38 2144 [note] The IPV6 is available.
2016-11-11 03:28:38 2144 [note]-':: ' resolves to ':: ';
2016-11-11 03:28:38 2144 [note] Server socket created on IP: ':: '. 2016-11-11 03:28:38 2144 [ERROR] Fatal Error:can ' t open and Lock Privilege tables:table ' mysql.user ' doesn ' t exist 16111 1 03:28:38 mysqld_safe mysqld from PID File/var/lib/mysql/azrlnx06.pid ended clip_image002

Search some relevant data, should be Perl-data-dumper module is not installed, causing the installation process, initialization database failed, so start the MySQL service, can not find the relevant system table. Specific reference official documents Mysql-server RPM does not install Perl-data-dumper as a dependency

Description:

Mysql-server requires Perl-data-dumper to function. However, Perl-data-dumper is isn't listed by the Mysql-server RPM as a dependency. So if a Linux server does is not have Perl-data-dumper installed, the install-mysql-db would fail. And because of missing the initial database, the MySQL service could not is started.

How to repeat:

On a Linux server, make sure there is no perl-data-dumper installed. Install mysql-server using Yum. There should is error message complaining the database could not is created.

Suggested FIX:

Add Perl-data-dumper as a dependency of the RPM package

Workaround:

1: Install Perl-data-dumper module.

[root@azrlnx06 mysql]# Yum install-y perl-data-dumper

2: Initializing the database

[root@azrlnx06 mysql]# sudo mysql_install_db--user=mysql--basedir=/usr/--ldata=/var/lib/mysql/clip_image003


[root@azrlnx06 mysql]# service MySQL start
starting MySQL. Success! 
[root@azrlnx06 mysql]#/usr//bin/mysqladmin-u root password ' qwe!23 '
warning:using a password on the command line in Terface can be insecure.

Of course, you can uninstall MySQL, and then reinstall, you can see the installation process output of the detail information output.

The above is a small set to introduce the CentOS 7 installed MySQL 5.6 Encounter a variety of conflict problems, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.