6遇到的各个题材总括,陆遇见的疑难杂症小结

在1测试服务器(CentOS Linux release 七.2.151壹)上设置MySQL 5.陆(5.6.1九MySQL Community Server)时遇上上面错误,那几个是因为CentOS
柒的默许数据库已经不复是MySQL了,而是玛丽亚DB. MySQL安装时的mysql
lib库与mariadb的库、包冲突了,如下详情所示(省略了汪洋日记)

CentOS 7 安装MySQL 伍.陆相逢的疑难杂症小结,centosmysql

在一测试服务器(CentOS Linux release 七.2.1511)上安装MySQL 伍.陆(伍.6.19MySQL Community Server)时遇上下边错误,那几个是因为CentOS
柒的私下认可数据库已经不再是MySQL了,而是MariaDB. MySQL安装时的mysql
lib库与mariadb的库、包争执了,如下详情所示(省略了汪洋日志)

 

[[email protected] 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 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/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_64

        file /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_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 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/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

 

反省是或不是留存mariadb的连带组件,然后删除mariadb相关组件。如下所示:

 

[[email protected] mysql]# more /etc/redhat-release 

CentOS Linux release 7.2.1511 (Core) 

[[email protected] mysql]# rpm -qa |grep mariadb

mariadb-libs-5.5.50-1.el7_2.x86_64

[[email protected] 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

[[email protected] mysql]# rpm -e mariadb-libs-5.5.50-1.el7_2.x86_64 --nodeps

 

理所当然那里删除mariadb-libs-5.五.50-一.el七_6遇到的各个题材总括,陆遇见的疑难杂症小结。2.x86_6四零部件时遇上注重错误,遂强制删除该零件,最棒使用yum删除mariadb相关组件。然后重新安装MySQL时碰着”error:
MySQL-server-advanced-5.6.20-一.rhel5.x八陆_6肆: install
failed”错误,如下所示:

 

[[email protected] mysql]# cd /tmp

[[email protected] tmp]# ls

hsperfdata_azrlnx06  jirasetup  MySQL-server-advanced-5.6.20-1.rhel5.x86_64.rpm

[[email protected] 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

[[email protected] tmp]# 

 

对这些漏洞非常多有点莫明其妙,卸载MySQL相关组件后,重新安装MySQL,发现不够Perl相关模组。如下所示:

 

[[email protected] 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::Dumper

[[email protected] jirasetup]# 

 

 

使用yum安装了 perl
perl-devel相关包(注意:此处安装MySQL时,未有出口安装相关Detail的新闻,是因为Perl相关模组未有安装的由来,此间还漏掉了安装perl-Data-Dumper

[[email protected]
jirasetup]# yum install -y perl perl-devel

 

设置完Perl相关组件后,重新安装MySQL,如下所示,安装成功,但是尚未出口安装相关Detail的音信(因为未有设置perl-Data-Dumper),运维MySQL报错

[email protected] 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%]

[[email protected] 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%]

[[email protected] ~]# service mysql start

Starting MySQL............. ERROR! The server quit without updating PID file (/var/lib/mysql/azrlnx06.pid).

[[email protected] ~]# 

 

找到MySQL的荒唐日志,然后检查/var/lib/mysql/azrlnx0六.err错误日志,发现如下错误消息:

 

[[email protected] 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

 

[[email protected] 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 (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 exist

2016-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 pages

2016-11-11 03:28:25 2144 [Note] InnoDB: The InnoDB memory heap is disabled

2016-11-11 03:28:25 2144 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2016-11-11 03:28:25 2144 [Note] InnoDB: Memory barrier is not used

2016-11-11 03:28:25 2144 [Note] InnoDB: Compressed tables use zlib 1.2.3

2016-11-11 03:28:25 2144 [Note] InnoDB: Using Linux native AIO

2016-11-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 2144 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!

2016-11-11 03:28:25 2144 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB

2016-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 log file ./ib_logfile101 size to 48 MB

2016-11-11 03:28:31 2144 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 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] 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 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 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: 3306

2016-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 exist

161111 03:28:38 mysqld_safe mysqld from pid file /var/lib/mysql/azrlnx06.pid ended

 

检索了1些有关材料,应该是perl-Data-Dumper模组未有安装,导致安装进度中,初阶化数据库失利,所以运营MySQL服务时,找不到相关联统表。具体参考官方文书档案MySQL-server
EnclavePM does not install perl-Data-Dumper as a dependency

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

 

不留余地办法:

 

 

1:安装perl-Data-Dumper模组。

[[email protected]
mysql]# yum install -y perl-Data-Dumper

 

二:开始化数据库

[[email protected]
mysql]# sudo mysql_install_db –user=mysql –basedir=/usr/
–ldata=/var/lib/mysql/

[[email protected] mysql]# service mysql start

 

Starting MySQL. SUCCESS! 

 

[[email protected] mysql]# /usr//bin/mysqladmin -u root password 'Qwe!23'

 

Warning: Using a password on the command line interface can be insecure.

 

 

自然也得以卸载MySQL,然后重新安装,就能见到安装进程输出的Detail音信输出了。

 

7 安装MySQL
5.陆遇见的疑难杂症小结,centosmysql 在1测试服务器(CentOS Linux release
柒.2.151一)上设置MySQL 5.陆(五.陆.19 MySQL Community
Server)时蒙受…

在一测试服务器(CentOS Linux release 七.二.151壹)上设置MySQL 5.6(伍.6.19MySQL Community Server)时遇到上面错误,这些是因为CentOS
七的暗中认可数据库已经不复是MySQL了,而是玛丽亚DB. MySQL安装时的mysql
lib库与mariadb的库、包争辩了,如下详情所示(省略了大气日记)

转自:

 

[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 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/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_64
file /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_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 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/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

linux版本:CentOS7 64位

[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 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/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_64

        file /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_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 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/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

自作者批评是否存在mariadb的连锁组件,然后删除mariadb相关组件。如下所示:

一、下载安装包“mysql-五.陆.33-linux-glibc二.伍-x八陆_64.tar.gz”

 

[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

经过命令下载:wget

自小编批评是否存在mariadb的有关组件,然后删除mariadb相关组件。如下所示:

理所当然那里删除mariadb-libs-伍.伍.50-一.el七_2.x86_6四零部件时遇上依赖错误,遂强制删除该零件,最佳使用yum删除mariadb相关组件。然后重新安装MySQL时相遇”error:
MySQL-server-advanced-伍.6.20-一.rhel5.x八6_64: install
failed”错误,如下所示:

# 安装信赖

 

[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

yum-y install perl perl-devel autoconf

[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

997755.com澳门葡京 1 

2、把下载的安装包移动到/usr/local/下。

 

对那么些荒唐有点莫明其妙,卸载MySQL相关组件后,重新安装MySQL,发现不够Perl相关模组。如下所示:

3、解压

理所当然那里删除mariadb-libs-伍.五.50-壹.el7_2.x86_6四零件时相遇重视错误,遂强制删除该零件,最棒使用yum删除mariadb相关组件。然后重新安装MySQL时遭遇”error:
MySQL-server-advanced-5.6.20-一.rhel5.x八陆_6四: install
failed”错误,如下所示:

[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::Dumper
[root@azrlnx06 jirasetup]# 

tar zxvf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz

 

使用yum安装了 perl
perl-devel相关包(注意:此处安装MySQL时,未有出口安装相关Detail的新闻,是因为Perl相关模组未有设置的来由,此处还漏掉了安装perl-Data-Dumper)

肆、复制解压后的mysql目录到系统的地头软件目录

[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]# 
[root@azrlnx06 jirasetup]# yum install -y perl perl-devel

cp mysql-5.6.33-linux-glibc2.5-x86_64 /usr/local/mysql -r

997755.com澳门葡京 2

设置完Perl相关组件后,重新安装MySQL,如下所示,安装成功,不过并未有出口安装相关Detail的新闻(因为尚未安装perl-Data-Dumper),运转MySQL报错

五、加多系统mysql组和mysql用户

 

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 ~]#

groupaddmysql

对那些破绽百出有点莫明其妙,卸载MySQL相关组件后,重新安装MySQL,发现不够Perl相关模组。如下所示:

找到MySQL的一无可取日志,然后检查/var/lib/mysql/azrlnx0陆.err错误日志,发现如下错误音信:

useradd -r -g mysql -s /bin/false mysql

 

[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::Dumper

[root@azrlnx06 jirasetup]# 
[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 (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 exist
2016-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 pages
2016-11-11 03:28:25 2144 [Note] InnoDB: The InnoDB memory heap is disabled
2016-11-11 03:28:25 2144 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-11-11 03:28:25 2144 [Note] InnoDB: Memory barrier is not used
2016-11-11 03:28:25 2144 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-11-11 03:28:25 2144 [Note] InnoDB: Using Linux native AIO
2016-11-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 2144 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2016-11-11 03:28:25 2144 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2016-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 log file ./ib_logfile101 size to 48 MB
2016-11-11 03:28:31 2144 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 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] 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 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 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: 3306
2016-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 exist
161111 03:28:38 mysqld_safe mysqld from pid file /var/lib/mysql/azrlnx06.pid ended
clip_image002

注意:Because the userisrequired onlyforownership purposes, not login
purposes, the useradd command uses the -r and -s /bin/falseoptions to
create a user that does not have login permissions to your server host.
Omit these optionsifyour useradd does not support them.

 

997755.com澳门葡京 3 

陆、进入安装mysql软件目录,修改目录拥有者为mysql用户

 

寻觅了壹部分有关资料,应该是perl-Data-Dumper模组未有设置,导致安装进程中,开始化数据库退步,所以运营MySQL服务时,找不到相关联统表。具体参考官方文书档案MySQL-server
途观PM does not install perl-Data-Dumper as a dependency

cd mysql/

使用yum安装了 perl
perl-devel相关包(注意:此处安装MySQL时,未有出口安装相关Detail的新闻,是因为Perl相关模组未有设置的因由,此间还漏掉了安装perl-Data-Dumper

Description:

chown-Rmysql:mysql./

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

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:

./scripts/mysql_install_997755.com澳门葡京 ,db –user=mysql

安装完Perl相关组件后,重新安装MySQL,如下所示,安装成功,可是未有出口安装相关Detail的音讯(因为尚未设置perl-Data-Dumper),运营MySQL报错

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.

FATAL ERROR: please install the following Perl modules before executing
scripts/mysql_install_db:

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 ~]# 

Suggested fix:

Data::Dumper

 

Add perl-Data-Dumper as a dependency of the RPM package

#消除方法:

找到MySQL的不当日志,然后检查/var/lib/mysql/azrlnx06.err错误日志,发现如下错误音讯:

消除措施:

yum install -y perl-Data-Dumper

 

1:安装perl-Data-Dumper模组。

捌、修改当前目录拥有者为root用户

[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 (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 exist

2016-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 pages

2016-11-11 03:28:25 2144 [Note] InnoDB: The InnoDB memory heap is disabled

2016-11-11 03:28:25 2144 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2016-11-11 03:28:25 2144 [Note] InnoDB: Memory barrier is not used

2016-11-11 03:28:25 2144 [Note] InnoDB: Compressed tables use zlib 1.2.3

2016-11-11 03:28:25 2144 [Note] InnoDB: Using Linux native AIO

2016-11-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 2144 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!

2016-11-11 03:28:25 2144 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB

2016-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 log file ./ib_logfile101 size to 48 MB

2016-11-11 03:28:31 2144 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 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] 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 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 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: 3306

2016-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 exist

161111 03:28:38 mysqld_safe mysqld from pid file /var/lib/mysql/azrlnx06.pid ended
[root@azrlnx06 mysql]# yum install -y perl-Data-Dumper

chown-R root:root ./

997755.com澳门葡京 4

二:早先化数据库

玖、修改当前data目录拥有者为mysql用户

 

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

chown-Rmysql:mysqldata

追寻了有个别相关资料,应该是perl-Data-Dumper模组未有设置,导致安装进程中,初始化数据库战败,所以运营MySQL服务时,找不到相关联统表。具体参考官方文书档案MySQL-server
RPM does not install perl-Data-Dumper as a
dependency

997755.com澳门葡京 5

==============到此数据库安装完成=============

Description:

[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 interface can be insecure.

10、运营mysql服务和增进开机运维mysql服务

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.

理所当然也足以卸载MySQL,然后重新安装,就能观察安装进程输出的Detail新闻输出了。

增添开机运转,把运行脚本放到开机初步化目录。

How to repeat:

997755.com澳门葡京 6 

cp support-files/mysql.server /etc/init.d/mysql

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.

以上所述是作者给大家介绍的CentOS 柒 安装 MySQL
5.六遇上的种种冲突难点,希望对我们有着协助,就算我们有其余疑问请给自身留言,笔者会及时还原我们的。在此也万分谢谢大家对剧本之家网址的支撑!

11、启动mysql服务

Suggested fix:

你或然感兴趣的篇章:

  • Centos7下使用yum安装mysql数据库的详实教程(巩固版)
  • centos7 用rpm安装mysql详解
  • CentOS7.2虚拟机上安装MySQL
    伍.6.32的科目
  • CentOS 七x6四下Apache+MySQL(玛丽亚db)+PHP5陆的装置教程详解
  • centos 七系统下编写翻译安装
    mysql⑤.7科目
  • CentOS 柒.2 Yum编写翻译安装MySQL
    5.陆
  • centOS7安装MySQL数据库

#创建缺乏的文件夹

Add perl-Data-Dumper as a dependency of the RPM package

mkdir /var/log/mariadb

 

servicemysqlstart

涸泽而渔办法:

常规提醒音讯:Starting MySQL. SUCCESS!

 

1二、把mysql客户端放到私下认可路径

 

ln -s /usr/local/mysql/bin/mysql/usr/local/bin/mysql

1:安装perl-Data-Dumper模组。

留神:提议使用软链过去,不要向来包文件复制,便于系统装置多少个版本的mysql

[root@azrlnx06 mysql]# yum install -y perl-Data-Dumper

=================== 那是分割线 ==================

 

通过行使 mysql -uroot -p
连接数据库(默认数据库的root用户并未有密码,这一个需求安装一个密码)。

2:起先化数据库

错误音信:ERROR 2002 (HY000): Can’t connect to local MySQL server
through socket ‘/tmp/mysql.sock’ (2)

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

化解方法:展开/etc/my.cnf,看看里面配备的socket地点是如何目录。“socket=/var/lib/mysql/mysql.sock”

997755.com澳门葡京 7

途径和“/tmp/mysql.sock”不一致。建立三个软连接:ln -s
/var/lib/mysql/mysql.sock /tmp/mysql.sock

[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 interface can be insecure.

到此地义务算是大功告成了。之后就足以创设数据库用户,然后使用数据库了。

 

997755.com澳门葡京 8

 

###################### 分割线
######################

理所当然也能够卸载MySQL,然后重新安装,就能看出安装进程输出的Detail音信输出了。

权限控制

 

一、去除匿名用户

997755.com澳门葡京 9

# 测试匿名用户登录

mysql-ux3

997755.com澳门葡京 10

可以看来匿名用户能够登录,具有information_schema和test库的连锁权限。

# 删除匿名用户,使用root用户登录数据库

deletefrommysql.userwhereUser=”;

flush privileges;

997755.com澳门葡京 11

重新测试匿名用户登录

997755.com澳门葡京 12

相关文章

发表评论

电子邮件地址不会被公开。 必填项已用*标注

*
*
Website