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

相关文章

linux生产者,消费者问题

pthread_cond_wait() :用于阻塞当前线程,等待别的线程使用pthread_cond_signal()或pthread_cond_broadcast来唤醒它。 pthread_cond_wait() 必须与pthread_mutex 配套使用。pthread_cond_wait()函数一进入wait状态就会自动release mutex。当其他线程通过pthread

C语言中联合体union的使用

本文编辑整理自: http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=179471 一、前言 “联合体”(union)与“结构体”(struct)有一些相似之处。但两者有本质上的不同。在结构体中,各成员有各自的内存空间, 一个结构变量的总长度是各成员长度之和。而在“联合”中,各成员共享一段内存空间, 一个联合变量

ESP32 esp-idf esp-adf环境安装及.a库创建与编译

简介 ESP32 功能丰富的 Wi-Fi & 蓝牙 MCU, 适用于多样的物联网应用。使用freertos操作系统。 ESP-IDF 官方物联网开发框架。 ESP-ADF 官方音频开发框架。 文档参照 https://espressif-docs.readthedocs-hosted.com/projects/esp-adf/zh-cn/latest/get-started/index

Linux 安装、配置Tomcat 的HTTPS

Linux 安装 、配置Tomcat的HTTPS 安装Tomcat 这里选择的是 tomcat 10.X ,需要Java 11及更高版本 Binary Distributions ->Core->选择 tar.gz包 下载、上传到内网服务器 /opt 目录tar -xzf 解压将解压的根目录改名为 tomat-10 并移动到 /opt 下, 形成个人习惯的路径 /opt/tomcat-10

Tolua使用笔记(上)

目录   1.准备工作 2.运行例子 01.HelloWorld:在C#中,创建和销毁Lua虚拟机 和 简单调用。 02.ScriptsFromFile:在C#中,对一个lua文件的执行调用 03.CallLuaFunction:在C#中,对lua函数的操作 04.AccessingLuaVariables:在C#中,对lua变量的操作 05.LuaCoroutine:在Lua中,

RedHat运维-Linux文本操作基础-AWK进阶

你不用整理,跟着敲一遍,有个印象,然后把它保存到本地,以后要用再去看,如果有了新东西,你自个再添加。这是我参考牛客上的shell编程专项题,只不过换成了问答的方式而已。不用背,就算是我自己亲自敲,我现在好多也记不住。 1. 输出nowcoder.txt文件第5行的内容 2. 输出nowcoder.txt文件第6行的内容 3. 输出nowcoder.txt文件第7行的内容 4. 输出nowcode

【Linux进阶】UNIX体系结构分解——操作系统,内核,shell

1.什么是操作系统? 从严格意义上说,可将操作系统定义为一种软件,它控制计算机硬件资源,提供程序运行环境。我们通常将这种软件称为内核(kerel),因为它相对较小,而且位于环境的核心。  从广义上说,操作系统包括了内核和一些其他软件,这些软件使得计算机能够发挥作用,并使计算机具有自己的特生。这里所说的其他软件包括系统实用程序(system utility)、应用程序、shell以及公用函数库等

Vim使用基础篇

本文内容大部分来自 vimtutor,自带的教程的总结。在终端输入vimtutor 即可进入教程。 先总结一下,然后再分别介绍正常模式,插入模式,和可视模式三种模式下的命令。 目录 看完以后的汇总 1.正常模式(Normal模式) 1.移动光标 2.删除 3.【:】输入符 4.撤销 5.替换 6.重复命令【. ; ,】 7.复制粘贴 8.缩进 2.插入模式 INSERT

VMware9.0详细安装

双击VMware-workstation-full-9.0.0-812388.exe文件: 直接点Next; 这里,我选择了Typical(标准安装)。 因为服务器上只要C盘,所以我选择安装在C盘下的vmware文件夹下面,然后点击Next; 这里我把√取消了,每次启动不检查更新。然后Next; 点击Next; 创建快捷方式等,点击Next; 继续Cont

Lipowerline5.0 雷达电力应用软件下载使用

1.配网数据处理分析 针对配网线路点云数据,优化了分类算法,支持杆塔、导线、交跨线、建筑物、地面点和其他线路的自动分类;一键生成危险点报告和交跨报告;还能生成点云数据采集航线和自主巡检航线。 获取软件安装包联系邮箱:2895356150@qq.com,资源源于网络,本介绍用于学习使用,如有侵权请您联系删除! 2.新增快速版,简洁易上手 支持快速版和专业版切换使用,快速版界面简洁,保留主