安装mysql5.7
1安装前,我们可以检测系统是否自带安装 MySQL:
	rpm -qa | grep mysql
	如果你系统有安装,那可以选择进行卸载:
	rpm -e mysql  // 普通删除模式
	rpm -e --nodeps mysql  // 强力删除模式,如果使用上面命令删除时,提示有依赖的其它文件,则用该命令可以对其进行强力删除
	
	find / -name mysql有文件夹 都删除
	
2安装 MySQL:

	接下来我们在 Centos7 系统下使用 yum 命令安装 MySQL
		wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
		rpm -ivh mysql57-community-release-el7-9.noarch.rpm
		yum install mysql-server

	启动 MySQL:

		systemctl start mysqld
		systemctl stop mysqld
		systemctl restart mysqld
		
	查看 MySQL 运行状态:

		systemctl status mysqld

	验证 MySQL 安装
		mysqladmin --version


4 mysql 5.7 修改密码 两种方式
			etc/my.cnf
			skip-grant-tables=1
			无需密码登入


		设置密码
		use mysql;
		update user set authentication_string=password('123456') where user='root' and host='%'; 
		flush privileges;
		
		 mysql 8.0以上 修改密码*************************
		 (mysql8.0以上密码策略限制必须要大小写加数字特殊符号)
		ALTER USER 'root'@'localhost' IDENTIFIED WITH MYSQL_NATIVE_PASSWORD BY 'MyNewPwd@8888';	
		
		mysql5.7常见问题
		1,MySQL异常:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains 	
		  nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns 
		  in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
		  解决:在my.cnf中加入如下代码:
		


		[mysqld] 
		sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

		2,liunx [Err] 1146 - Table 'performance_schema.session_status' doesn't exist 常见于mysql升级到5.7
			1,搜索mysql/bin文件夹在哪 rpm -qal |grep mysql/bin
			2,cd /www/server/mysql/bin/
			3,mysql_upgrade -u root -p --force
			4,Enter password:输入mysql密码 如没有密码直接回车即可
			5,执行完成重启mysql服务即可