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

相关文章

java图像识别工具类(ImageRecognitionUtils)使用实例详解

《java图像识别工具类(ImageRecognitionUtils)使用实例详解》:本文主要介绍如何在Java中使用OpenCV进行图像识别,包括图像加载、预处理、分类、人脸检测和特征提取等步骤... 目录前言1. 图像识别的背景与作用2. 设计目标3. 项目依赖4. 设计与实现 ImageRecogni

python管理工具之conda安装部署及使用详解

《python管理工具之conda安装部署及使用详解》这篇文章详细介绍了如何安装和使用conda来管理Python环境,它涵盖了从安装部署、镜像源配置到具体的conda使用方法,包括创建、激活、安装包... 目录pytpshheraerUhon管理工具:conda部署+使用一、安装部署1、 下载2、 安装3

Mysql虚拟列的使用场景

《Mysql虚拟列的使用场景》MySQL虚拟列是一种在查询时动态生成的特殊列,它不占用存储空间,可以提高查询效率和数据处理便利性,本文给大家介绍Mysql虚拟列的相关知识,感兴趣的朋友一起看看吧... 目录1. 介绍mysql虚拟列1.1 定义和作用1.2 虚拟列与普通列的区别2. MySQL虚拟列的类型2

使用MongoDB进行数据存储的操作流程

《使用MongoDB进行数据存储的操作流程》在现代应用开发中,数据存储是一个至关重要的部分,随着数据量的增大和复杂性的增加,传统的关系型数据库有时难以应对高并发和大数据量的处理需求,MongoDB作为... 目录什么是MongoDB?MongoDB的优势使用MongoDB进行数据存储1. 安装MongoDB

关于@MapperScan和@ComponentScan的使用问题

《关于@MapperScan和@ComponentScan的使用问题》文章介绍了在使用`@MapperScan`和`@ComponentScan`时可能会遇到的包扫描冲突问题,并提供了解决方法,同时,... 目录@MapperScan和@ComponentScan的使用问题报错如下原因解决办法课外拓展总结@

mysql数据库分区的使用

《mysql数据库分区的使用》MySQL分区技术通过将大表分割成多个较小片段,提高查询性能、管理效率和数据存储效率,本文就来介绍一下mysql数据库分区的使用,感兴趣的可以了解一下... 目录【一】分区的基本概念【1】物理存储与逻辑分割【2】查询性能提升【3】数据管理与维护【4】扩展性与并行处理【二】分区的

使用Python实现在Word中添加或删除超链接

《使用Python实现在Word中添加或删除超链接》在Word文档中,超链接是一种将文本或图像连接到其他文档、网页或同一文档中不同部分的功能,本文将为大家介绍一下Python如何实现在Word中添加或... 在Word文档中,超链接是一种将文本或图像连接到其他文档、网页或同一文档中不同部分的功能。通过添加超

Linux使用fdisk进行磁盘的相关操作

《Linux使用fdisk进行磁盘的相关操作》fdisk命令是Linux中用于管理磁盘分区的强大文本实用程序,这篇文章主要为大家详细介绍了如何使用fdisk进行磁盘的相关操作,需要的可以了解下... 目录简介基本语法示例用法列出所有分区查看指定磁盘的区分管理指定的磁盘进入交互式模式创建一个新的分区删除一个存

C#使用HttpClient进行Post请求出现超时问题的解决及优化

《C#使用HttpClient进行Post请求出现超时问题的解决及优化》最近我的控制台程序发现有时候总是出现请求超时等问题,通常好几分钟最多只有3-4个请求,在使用apipost发现并发10个5分钟也... 目录优化结论单例HttpClient连接池耗尽和并发并发异步最终优化后优化结论我直接上优化结论吧,

SpringBoot使用Apache Tika检测敏感信息

《SpringBoot使用ApacheTika检测敏感信息》ApacheTika是一个功能强大的内容分析工具,它能够从多种文件格式中提取文本、元数据以及其他结构化信息,下面我们来看看如何使用Ap... 目录Tika 主要特性1. 多格式支持2. 自动文件类型检测3. 文本和元数据提取4. 支持 OCR(光学