In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "what are the problems encountered in installing MySQL5.6 in CentOS7". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The following error was encountered when installing mysql 5.6 (5.6.19 mysql community server) on a test server (centos linux release 7.2.1511) because the default database for centos 7 is no longer mysql, but mariadb. The mysql lib library of mysql installation conflicts with the library and package of mariadb, as shown in the following details (a large number of logs are omitted)
[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_64file / 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_64file / 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_64file / 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_64file / usr/share/mysql/estonian/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_64file / usr/share/mysql/french/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_64file / usr/share/mysql/german/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_64file / 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 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_64file / usr/share/mysql/charsets/swe7.xml 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
Check for the existence of mariadb-related components, and then remove mariadb-related components. As follows:
[root@azrlnx06 mysql] # more / etc/redhat-release centos linux release 7.2.1511 (core) [root@azrlnx06 mysql] # rpm-qa | grep mariadbmariadb-libs-5.5.50-1.el7_2.x86_64 [root@azrlnx06 mysql] # rpm-e mariadb-libs-5.5.50-1.el7_2.x86_64error: failed dependencies:libmysqlclient.so.18 () (64bit) is needed by (installed) postfix-2:2.10.1-6.el7.x86 _ 64libmysqlclient.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, there is a dependency error when deleting the mariadb-libs-5.5.50-1.el7_2.x86_64 component here, so it is forced to delete the component, and it is best to use yum to delete the mariadb-related components. Then you encounter a "error: mysql-server-advanced-5.6.20-1.rhel5.x86_64: install failed" error when reinstalling mysql, as shown below:
[root@azrlnx06 mysql] # cd / tmp [root@azrlnx06 tmp] # lshsperfdata_azrlnx06 jirasetup mysql-server-advanced-5.6.20-1.rhel5.x8664.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 directoryerror: mysql-server-advanced-5.6.20-1.rhel5.x86_64: install failed [root@azrlnx06 tmp] # clip_image001
A little baffled by this error, uninstall mysql-related components, reinstall mysql, and find that perl-related modules are missing. As follows:
[root@azrlnx06 jirasetup] # rpm-ivh mysql-server-advanced-5.6.20-1.rhel5.x86_64.rpm preparing... # # 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:: dumper [root @ azrlnx06 jirasetup] #
Perl perl-devel-related packages are installed using yum (Note: when installing mysql here, no information about installing detail is output because the perl-related modules are not installed, and the installation of perl-data-dumper is omitted here)
[root@azrlnx06 jirasetup] # yum install-y perl perl-devel
After installing the related components of perl, reinstall mysql, as shown below, the installation is successful, but there is no output of the information about the installation of detail (because perl-data-dumper is not installed), start mysql and report an 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## [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## [root@azrlnx06 ~] # service mysql startstarting mysql. Error! The server quit without updating pid file (/ var/lib/mysql/azrlnx06.pid). [root@azrlnx06 ~] #
Locate the error log for mysql, then check the / var/lib/mysql/azrlnx06.err error log and find 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.err161111 03:28:25 mysqld_safe starting mysqld daemon with databases from / var/lib/mysql2016-11- 11 03:28:25 0 [warning] timestamp with implicit default value is deprecated. Please use-- explicit_defaults_for_timestamp server option (see documentation for more details). 2016-11-11 03:28:25 2144 [note] plugin' federated' is disabled./usr/sbin/mysqld: table 'mysql.plugin' doesn't exist2016-11-11 03:28:25 2144 [error] can't open the mysql.plugin table. Please run mysql_upgrade to create it.2016-11-11 03:28:25 2144 [note] innodb: using atomics to ref count buffer pool pages2016-11-11 03:28:25 2144 [note] innodb: the innodb memory heap is disabled2016-11-11 03:28:25 2144 [note] innodb: mutexes and rw_locks use gcc atomic builtins2016-11-11 03:28:25 2144 [note] innodb: memory barrier is not used2016-11-11 03:28:25 2144 [note] innodb: compressed tables use zlib .32016-11-11 03:28:25 2144 [note] innodb: using linux native aio2016-11-11 03:28:25 2144 [note] innodb: using cpu crc32 instructions2016-11-11 03:28:25 2144 [note] innodb: initializing buffer pool Size = 128.0m2016-11-11 03:28:25 2144 [note] innodb: completed initialization of buffer pool2016-11-11 03:28:25 2144 [note] innodb: the first specified data file. / ibdata1 did not exist: a new database to be created2016-11 03:28:25 2144 [note] innodb: setting file. / ibdata1 size to 12 mb2016-11-11 03:28:25 2144 [note] innodb: database physically writes the file full: wait...2016-11-11 03:28:26 2144 [note] innodb: setting logfile. / ib_logfile101 size to 48 mb2016-11-11 03:28:31 2144 [note] innodb: setting logfile. / ib_logfile1 size to 48 mb2016-11-11 03:28:37 2144 [note] innodb: renaming logfile. / ib_logfile101 to. / ib_logfile02016-11-11 03:28:37 2144 [warning] innodb: new log files created Lsn=457812016-11-11 03:28:37 2144 [note] innodb: doublewrite buffer not found: creating new2016-11-11 03:28:37 2144 [note] innodb: doublewrite buffer created2016-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 created2016-11-11 03:28:37 2144 [note] innodb: 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 start2016-11-11 03:28:38 2144 [note] innodb: 5.6.20 started Log sequence number 02016-11-11 03:28:38 2144 [warning] no existing uuid has been found, so we assume that this is the first time that 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 will not work.2016-11-11 03:28:38 2144 [note] rsa public key file not found: / var/lib/mysql//public_key.pem. Some authentication plugins will not work.2016-11-11 03:28:38 2144 [note] server hostname (bind-address):'*'; port: 33062016-11-11 03:28:38 2144 [note] 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 exist161111 03:28:38 mysqld_safe mysqld from pid file / var/lib/mysql/azrlnx06.pid endedclip_image002
Search for some relevant information, it should be that the perl-data-dumper module is not installed, resulting in the installation process, the initialization of the database failed, so when starting the mysql service, can not find the relevant system table. Refer to the official document mysql-server rpm does not install perl-data-dumper as a dependency for details.
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
Solution:
1: install perl-data-dumper module.
[root@azrlnx06 mysql] # yum install-y perl-data-dumper
2: initialize the database
[root@azrlnx06 mysql] # sudo mysql_install_db-user=mysql-basedir=/usr/-ldata=/var/lib/mysql/clip_ image003 [root @ azrlnx06 mysql] # service mysql startstarting mysql. Success! [root@azrlnx06 mysql] # / usr//bin/mysqladmin-u root password'qweeting 23 stories: using a password on the command line interface can be insecure.
Of course, you can also uninstall mysql and then reinstall it, and you can see the output of detail information from the installation process.
This is the end of the content of "what are the problems encountered in installing MySQL5.6 in CentOS7". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.