linux使用yum安装MySQL5.6及Unknown/unsupported storage engine: InnoDB处理

本文主要是介绍linux使用yum安装MySQL5.6及Unknown/unsupported storage engine: InnoDB处理,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

2.1 Installing MySQL on Linux Using the MySQL Yum Repository

指导文档:http://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html

[root@m01 software]# yum -y remove mysql-libs.x86_64

1.Adding the MySQL Yum Repository

a.下载mysql5.7 yum资源库(Download MySQL Yum Repository

网页下载:http://dev.mysql.com/downloads/repo/yum/

或者wget下载如下:

[root@m01 software]# wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

--2016-10-16 00:29:06--  http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

Resolving dev.mysql.com... 137.254.60.11

Connecting to dev.mysql.com|137.254.60.11|:80... connected.

HTTP request sent, awaiting response... 302 Found

Location: http://repo.mysql.com//mysql-community-release-el6-5.noarch.rpm [following]

--2016-10-16 00:29:08--  http://repo.mysql.com//mysql-community-release-el6-5.noarch.rpm

Resolving repo.mysql.com... 23.13.185.161

Connecting to repo.mysql.com|23.13.185.161|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 5824 (5.7K) [application/x-redhat-package-manager]

Saving to: mysql-community-release-el6-5.noarch.rpm

100%[======================================================================================================================>] 5,824       --.-K/s   in 0s

2016-10-16 00:29:18 (123 MB/s) - mysql-community-release-el6-5.noarch.rpmsaved [5824/5824]

b. 安装MySQL Yum Repository

[root@m01 software]# yum localinstall mysql-community-release-el6-5.noarch.rpm

Loaded plugins: product-id, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

Setting up Local Package Process

Examining mysql-community-release-el6-5.noarch.rpm: mysql-community-release-el6-5.noarch

Marking mysql-community-release-el6-5.noarch.rpm to be installed

Resolving Dependencies

--> Running transaction check

---> Package mysql-community-release.noarch 0:el6-5 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

Installing:

 mysql-community-release                    noarch                    el6-5                      /mysql-community-release-el6-5.noarch                    4.3 k

 

c.检查MySQL Yum Repository是否安装成功

[root@m01 software]# yum repolist all | grep mysql

Unable to read consumer identity

mysql-connectors-community        MySQL Connectors Community      enabled:    24

mysql-connectors-community-source MySQL Connectors Community - So disabled

mysql-tools-community             MySQL Tools Community           enabled:    38

mysql-tools-community-source      MySQL Tools Community - Source  disabled

mysql55-community                 MySQL 5.5 Community Server      disabled

mysql55-community-source          MySQL 5.5 Community Server - So disabled

mysql56-community                 MySQL 5.6 Community Server      enabled:   316

mysql56-community-source          MySQL 5.6 Community Server - So disabled

mysql57-community-dmr             MySQL 5.7 Community Server Deve disabled

mysql57-community-dmr-source      MySQL 5.7 Community Server Deve disabled

 

[root@m01 software]# yum repolist enabled | grep mysql

Unable to read consumer identity

mysql-connectors-community           MySQL Connectors Community              24

mysql-tools-community                MySQL Tools Community                   38

mysql56-community                    MySQL 5.6 Community Server             316

2.Selecting a Release Series

A.安装yum-config-manager

[root@m01 ~]# yum search yum-config-manager

Loaded plugins: product-id, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

================================================================= Matched: yum-config-manager ==================================================================

yum-utils.noarch : Utilities based around the yum package manager

[root@m01 ~]# yum install yum-utils

B.

[root@m01 ~]# yum-config-manager --disable mysql57-community

Loaded plugins: product-id

[root@m01 ~]# yum-config-manager --enable mysql56-community

Loaded plugins: product-id

=================================================================== repo: mysql56-community ====================================================================

[mysql56-community]

bandwidth = 0

base_persistdir = /var/lib/yum/repos/x86_64/6Server

baseurl = http://repo.mysql.com/yum/mysql-5.6-community/el/6/x86_64/

cache = 0

cachedir = /var/cache/yum/x86_64/6Server/mysql56-community

cost = 1000

enabled = True

enablegroups = True

....

 

[root@m01 ~]# yum repolist enabled | grep "mysql.*-community.*"

Unable to read consumer identity

mysql-connectors-community           MySQL Connectors Community              24

mysql-tools-community                MySQL Tools Community                   38

mysql56-community                    MySQL 5.6 Community Server             316

 

3.Installing MySQL

yum install mysql-community-server or

yum reinstall mysql-community-server

[root@m01 ~]# yum list installed | grep "^mysql"

Unable to read consumer identity

mysql-community-client.x86_64      5.6.34-2.el6              @mysql56-community

mysql-community-common.x86_64      5.6.34-2.el6              @mysql56-community

mysql-community-libs.x86_64        5.6.34-2.el6              @mysql56-community

mysql-community-release.noarch     el6-5                     @/mysql-community-release-el6-5.noarch

mysql-community-server.x86_64      5.6.34-2.el6              @mysql56-community

4.Starting the MySQL Server

[root@m01 ~]# service mysqld start

MySQL Daemon failed to start.

Starting mysqld:                                           [FAILED]

[root@m01 ~]# service mysqld status

mysqld is stopped

5.安装其他组件

yum --disablerepo=\* --enablerepo='mysql*-community*' list available

2.2 service mysqld start报错处理

1】查看日志

less /var/log/mysqld.log

2】日志报错

1.[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it

2.[Note] InnoDB: Not using CPU crc32 instructions

3.[ERROR] InnoDB: Could not open or create the system tablespace.

4.[ERROR] Plugin 'InnoDB' init function returned error

5.[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

3】使用mysqld  --user=root验证

2016-10-19 14:58:55 2631 [ERROR] Plugin 'InnoDB' init function returned error.

2016-10-19 14:58:55 2631 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

2016-10-19 14:58:55 2631 [ERROR] Unknown/unsupported storage engine: InnoDB

4】检查my.cnf

Default options are read from the following files in the given order:

/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf

[root@m01 /]# find -name my.cnf

./software/mysql/my.cnf

./usr/my.cnf

./etc/my.cnf

 

[root@m01 /]# cat /etc/my.cnf | grep -v '#'

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

symbolic-links=0

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[mysqld_safe]

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

 

 

 

5查看mysqld --verbose --help |less帮助

 mysqld --innodb=OFF --default-storage-engine=MyISAM  --user=root

 mysqld --skip-innodb --default-storage-engine=myisam --user=root

 

6】资料:


If you're using MySQL 5.6+ and want to disable InnoDB, don't forget "--default-tmp-storage" or it won't work:To disable InnoDB, use --innodb=OFF or --skip-innodb. In this case, because the default storage engine is InnoDB, the server will not start unless you also use --default-storage-engine and --default-tmp-storage-engine to set the default to some other engine for both permanent and TEMPORARY tables.

http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#option_mysqld_ignore-builtin-innodb

You can add this to your my.cnf:

[mysqld]

innodb=OFF

ignore-builtin-innodb

skip-innodb

default-storage-engine=myisam

default-tmp-storage-engine=myisam

 

2.3 Installing MySQL on Unix/Linux Using Generic Binaries


Warning

MySQL has a dependency on the libaio library. Data directory initialization and subsequent server startup steps will fail if this library is not installed locally. If necessary, install it using the appropriate package manager. For example, on Yum-based systems:

shell> yum search libaio  # search for info

shell> yum install libaio # install library

To install and use a MySQL binary distribution, the command sequence looks like this:

shell> groupadd mysql

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

shell> cd /usr/local

shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz

shell> ln -s full-path-to-mysql-VERSION-OS mysql

shell> cd mysql

shell> mkdir mysql-files

shell> chmod 750 mysql-files

shell> chown -R mysql .

shell> chgrp -R mysql .

shell> bin/mysql_install_db --user=mysql    # Before MySQL 5.7.6

shell> bin/mysqld --initialize --user=mysql # MySQL 5.7.6 and up

shell> bin/mysql_ssl_rsa_setup              # MySQL 5.7.6 and up

shell> chown -R root .

shell> chown -R mysql data mysql-files

shell> bin/mysqld_safe --user=mysql &

# Next command is optional

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

********************************************************************
** 欢迎转发,注明原文:blog.csdn.net/clark_xu   徐长亮的专栏
** 谢谢您的支持,欢迎关注微信公众号:clark_blog 
********************************************************************


这篇关于linux使用yum安装MySQL5.6及Unknown/unsupported storage engine: InnoDB处理的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1050631

相关文章

Zookeeper安装和配置说明

一、Zookeeper的搭建方式 Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式。 ■ 单机模式:Zookeeper只运行在一台服务器上,适合测试环境; ■ 伪集群模式:就是在一台物理机上运行多个Zookeeper 实例; ■ 集群模式:Zookeeper运行于一个集群上,适合生产环境,这个计算机集群被称为一个“集合体”(ensemble) Zookeeper通过复制来实现

CentOS7安装配置mysql5.7 tar免安装版

一、CentOS7.4系统自带mariadb # 查看系统自带的Mariadb[root@localhost~]# rpm -qa|grep mariadbmariadb-libs-5.5.44-2.el7.centos.x86_64# 卸载系统自带的Mariadb[root@localhost ~]# rpm -e --nodeps mariadb-libs-5.5.44-2.el7

Centos7安装Mongodb4

1、下载源码包 curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-4.2.1.tgz 2、解压 放到 /usr/local/ 目录下 tar -zxvf mongodb-linux-x86_64-rhel70-4.2.1.tgzmv mongodb-linux-x86_64-rhel70-4.2.1/

中文分词jieba库的使用与实景应用(一)

知识星球:https://articles.zsxq.com/id_fxvgc803qmr2.html 目录 一.定义: 精确模式(默认模式): 全模式: 搜索引擎模式: paddle 模式(基于深度学习的分词模式): 二 自定义词典 三.文本解析   调整词出现的频率 四. 关键词提取 A. 基于TF-IDF算法的关键词提取 B. 基于TextRank算法的关键词提取

无人叉车3d激光slam多房间建图定位异常处理方案-墙体画线地图切分方案

墙体画线地图切分方案 针对问题:墙体两侧特征混淆误匹配,导致建图和定位偏差,表现为过门跳变、外月台走歪等 ·解决思路:预期的根治方案IGICP需要较长时间完成上线,先使用切分地图的工程化方案,即墙体两侧切分为不同地图,在某一侧只使用该侧地图进行定位 方案思路 切分原理:切分地图基于关键帧位置,而非点云。 理论基础:光照是直线的,一帧点云必定只能照射到墙的一侧,无法同时照到两侧实践考虑:关

使用SecondaryNameNode恢复NameNode的数据

1)需求: NameNode进程挂了并且存储的数据也丢失了,如何恢复NameNode 此种方式恢复的数据可能存在小部分数据的丢失。 2)故障模拟 (1)kill -9 NameNode进程 [lytfly@hadoop102 current]$ kill -9 19886 (2)删除NameNode存储的数据(/opt/module/hadoop-3.1.4/data/tmp/dfs/na

Hadoop数据压缩使用介绍

一、压缩原则 (1)运算密集型的Job,少用压缩 (2)IO密集型的Job,多用压缩 二、压缩算法比较 三、压缩位置选择 四、压缩参数配置 1)为了支持多种压缩/解压缩算法,Hadoop引入了编码/解码器 2)要在Hadoop中启用压缩,可以配置如下参数

Makefile简明使用教程

文章目录 规则makefile文件的基本语法:加在命令前的特殊符号:.PHONY伪目标: Makefilev1 直观写法v2 加上中间过程v3 伪目标v4 变量 make 选项-f-n-C Make 是一种流行的构建工具,常用于将源代码转换成可执行文件或者其他形式的输出文件(如库文件、文档等)。Make 可以自动化地执行编译、链接等一系列操作。 规则 makefile文件

linux-基础知识3

打包和压缩 zip 安装zip软件包 yum -y install zip unzip 压缩打包命令: zip -q -r -d -u 压缩包文件名 目录和文件名列表 -q:不显示命令执行过程-r:递归处理,打包各级子目录和文件-u:把文件增加/替换到压缩包中-d:从压缩包中删除指定的文件 解压:unzip 压缩包名 打包文件 把压缩包从服务器下载到本地 把压缩包上传到服务器(zip