本文主要包含centos6.5 mysql5.6,centos6.5安装教程,centos6.5安装,centos6.5安装mysql,虚拟机安装centos6.5等服务器相关知识,网友希望可以进行参考
Centos6.5 安装 MySQL5.6
Centos6.5 安装 MySQL5.6 or MySQL5.7 or 卸载MySQL
1.安装 MySQL5.6
rpm -qa | grep mysqlmysql-utilities-1.3.6-1.el6.noarchmysql-server-5.1.71-1.el6.x86_64mysql-libs-5.1.71-1.el6.x86_64mysql-5.1.71-1.el6.x86_64mysql-connector-python-1.1.4-1.el6.noarchmysql-devel-5.1.71-1.el6.x86_64yum remove mysql*yum install http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpmyum install mysql mysql-devel mysql-server mysql-utilities2.安装 MySQL5.7
1).检测系统是否自带安装MySQLyum list installed | grep mysql2).删除系统自带的MySQL及其依赖 命令:yum -y remove mysql-libs.x86_643).给CentOS添加rpm源,并且选择较新的源 命令wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpmyum localinstall mysql-community-release-el6-5.noarch.rpmyum repolist all | grep mysqlyum-config-manager --disable mysql55-communityyum-config-manager --disable mysql56-communityyum-config-manager --enable mysql57-community-dmryum repolist enabled | grep mysql4).安装MySql服务器 命令yum install mysql-community-server5).启动MySQL命令service mysqld start6).查看MySQL是否自启动,并且设置开启自启动 命令chkconfig --list | grep mysqldchkconfig mysqld on7).MySQL安全设置 命令mysql_secure_installationmysql的默认配置文件一般在这几个文件里 [/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf ]
修改密码时一直报错: ERROR 1819 (HY000): Your password does NOT satisfy the CURRENT policy requirements。 是因为MySQL5.6.6增加了密码强度验证插件validate_password,相关参数设置的较为严格,所以…… 通过以下命令参数修改配置文件,然后重启服务即可
# plugin env plugin-load=validate_password.so validate-password=OFF # ON/OFF/... 设置为关闭使用免密码方式登录到mysql命令行窗口
8).[root@iZ250x18mnzZ myweb]# mysqld_safe --skip-grant-tables &[1] 26390[root@iZ250x18mnzZ myweb]# 2016-03-09T13:52:36.487526Z mysqld_safe Logging to '/var/log/mysqld.log'.2016-03-09T13:52:36.519635Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql[root@iZ250x18mnzZ myweb]# [root@iZ250x18mnzZ myweb]# mysqlWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 2Server version: 5.7.11 MySQL Community Server (GPL)Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> 登录后修改密码
mysql> update mysql.user set authentication_string=PASSWORD('password') where user='root' and host='localhost';Query OK, 1 row affected, 1 warning (0.05 sec)Rows matched: 1 Changed: 1 Warnings: 1mysql> flush privileges;Query OK, 0 rows affected (0.03 sec)3.Centos6.5 完全卸载MySQL
yum remove mysql*yum list installed | grep mysqlyum -y remove mysql-libs.x86_64yum remove mysql mysql-server mysql-libs mysql-serverfind / -name mysql 将找到的相关东西delete掉rpm -qa|grep mysql(查询出来的东东yum remove掉)rm -rf mysql

