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 
********************************************************************


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
使用yum安装MySQL 5.6,你可以按照以下步骤进行操作: 1. 首先,你可以检查你的系统是否已经安装MySQL使用以下命令可以列出已安装MySQL软件包: ``` yum list installed | grep mysql ``` 2. 如果你发现系统已经安装MySQL,你可以使用以下命令来卸载旧版本的MySQL: ``` yum remove mysql ``` 3. 接下来,你需要安装MySQL 5.6yum存储库。你可以通过安装mysql-community-release包来获得这个存储库: ``` yum install https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm ``` 4. 安装完成后,你将获得两个MySQLyum存储库文件:/etc/yum.repos.d/mysql-community.repo和/etc/yum.repos.d/mysql-community-source.repo。这些文件将提供MySQL 5.6安装包。 5. 最后,你可以使用以下命令来安装MySQL 5.6: ``` yum install mysql-community-server-5.6 ``` 通过按照上述步骤,你可以使用yum安装MySQL 5.6。请确保你在执行命令时具有适当的权限。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [linux CentOS6.5 yum安装mysql5.6](https://download.csdn.net/download/weixin_38673548/13700402)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [YUM方式安装Mysql 5.6](https://blog.csdn.net/SmartTxp/article/details/103054974)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [liunx下yum安装mysql5.6(简单、易懂、零报错!!!)](https://blog.csdn.net/weixin_44009447/article/details/106221476)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值