Mysql

Posted 答案

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mysql相关的知识,希望对你有一定的参考价值。

安装mysql 5.6

检查系统是否自带安装mysql

[[email protected] ~]# yum list installed | grep mysql 
mysql.x86_64            5.1.73-5.el6_6  @anaconda-CentOS-201508042137.x86_64/6.7
mysql-devel.x86_64      5.1.73-5.el6_6  @anaconda-CentOS-201508042137.x86_64/6.7
mysql-libs.x86_64       5.1.73-5.el6_6  @anaconda-CentOS-201508042137.x86_64/6.7

发现有系统自带mysql,将其删除

[[email protected] ~]#  yum -y remove mysql-libs.x86_64 

删除后可以再次检查是否还存在mysql

由于mysql的yum源服务器在国外,所以下载速度会比较慢,还好mysql5.6只有79M大,而mysql5.7就有182M了,所以这里想安装mysql5.6

[[email protected] ~]# wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

解压rpm 包(这个rpm还不是mysql的安装文件,只是两个yum源文件,执行后,在/etc/yum.repos.d/ 这个目录下多出mysql-community-source.repo和mysql-community.repo )

[[email protected] ~]# rpm -ivh mysql-community-release-el6-5.noarch.rpm 

用yum repolist mysql这个命令查看一下是否已经有mysql可安装文件 

[[email protected] ~]# yum repolist all | grep mysql
mysql-connectors-community MySQL Connectors Community enabled: 39
mysql-connectors-community-source MySQL Connectors Community - S disabled
mysql-tools-community MySQL Tools Community enabled: 49
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 - S disabled
mysql56-community MySQL 5.6 Community Server enabled: 377
mysql56-community-source MySQL 5.6 Community Server - S disabled
mysql57-community-dmr MySQL 5.7 Community Server Dev disabled
mysql57-community-dmr-source MySQL 5.7 Community Server Dev disabled

安装mysql 服务器

[[email protected] ~]# yum install -y mysql-community-server










以上是关于Mysql的主要内容,如果未能解决你的问题,请参考以下文章

从mysql的片段中加载ListView

连接MySQL出现错误:ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)(代码片段

使用 json rereiver php mysql 在片段中填充列表视图

关于mysql驱动版本报错解决,Cause: com.mysql.jdbc.exceptions.jdbc4Unknown system variable ‘query_cache_size(代码片段

修改MySQL密码报错“ERROR 1819 (HY000): Your password does not satisfy the current policy requirements“(代码片段

mysql查看版本的四种方法