如何从MySQL官方Yum仓库安装MySQL5.6

WBOY
Release: 2016-06-07 16:49:38
Original
942 people have browsed it

首先我们需要从MySQL开发者网站下载Yum仓库文件,导入Yum库后,一个简单的yumupdate命令将确保你运行在MySQL5.6的最新发布版上,

2013年10月,MySQL开发团队正式宣布支持Yum仓库,这就意味着我们现在可以从这个Yum库中获得最新和最优版的MySQL安装包。本文将在一台全新安装的CentOS6上安装MySQL5.6,如果你不熟悉MySQL5.6的新特性,我建议从MySQL 5.6的新特性开始,其中有很多非常有用的特性。

首先我们需要从MySQL开发者网站下载Yum仓库文件,导入Yum库后,一个简单的yumupdate命令将确保你运行在MySQL5.6的最新发布版上,包括一些安全特性的更新。Yum同时也将确保导入相关依赖库,这些都将使我们的安装过程简单化。进入,下载RedHat Enterprise Linux 6 / Oracle Linux 6版。

如何从MySQL官方Yum仓库安装MySQL5.6

点击链接No thanks, just start my download.直接下载。

如何从MySQL官方Yum仓库安装MySQL5.6

--------------------------------------分割线 --------------------------------------

Ubuntu 14.04下安装MySQL

《MySQL权威指南(原书第2版)》清晰中文扫描版 PDF

Ubuntu 14.04 LTS 安装 LNMP Nginx\PHP5 (PHP-FPM)\MySQL

Ubuntu 14.04下搭建MySQL主从服务器

Ubuntu 12.04 LTS 构建高可用分布式 MySQL 集群

Ubuntu 12.04下源代码安装MySQL5.6以及Python-MySQLdb

--------------------------------------分割线 --------------------------------------

下载完成后将Yum库导入到你的本地:

sudo yum localinstallmysql-community-release-el6-*.noarch.rpm

这个Yum库包含了MySQLServer,MySQL工作台管理工具以及ODBC驱动,现在可以通过下面的命令简单地安装MySQLServer:

sudo yum install mysql-community-server

至此我就可以使用Yum简单地管理MySQL更新,并能确保总是从官网软件库得到最新的发布版。

附录:

1、root password update failed

ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement.

解决办法:

[**@localhost ~]# mysql
mysql> set global read_only=0;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
[**@localhost ~]# /usr/bin/mysql_secure_installation

如此便可以重新更新root密码了!

2、[ERROR] InnoDB: Cannot create log files because data files are corrupt or the database was not shut down cleanly after creating the data files.

解决办法:进入你的mysql数据存放目录,,删除ibdata1文件即可,例如在我的环境下

#cd /var/lib/mysql
#mv ibdata1 ibdata1.bak

3、[ERROR] InnoDB: space header page consists of zero bytes in data file ./ibdata1

解决办法:修改配置文件my.cnf

根据个人环境空间大小和需求调节如下参数的值

innodb_buffer_pool_size = 256M
innodb_log_file_size = 256M
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 2

添加一条:

innodb_flush_method=normal

4、ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

解决办法:Google上有很多,我遇到这个情况的时候只是使用/usr/bin/mysql_secure_installation 重新设置一次。

本文永久更新链接地址:

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!