赞
踩
下载地址:https://downloads.mysql.com/archives/community/
下载Linux版本的安装包
mldir mysql-5.7
我这里忘记创建存放mysql目录了,直接放到/root目录下,很乱
tar -xvf mysql-5.7.37-1.el7.x86_64.rpm-bundle.tar
rpm -qa | grep mariadb
rpm -e --nodeps mariadb-libs-5.5.64-1.el7.x86_64
yum -y install perl
yum -y install net-tools
rpm -ivh mysql-community-common-5.7.37-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.37-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.37-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.37-1.el7.x86_64.rpm
systemctl start mysqld
systemctl status mysqld
复制密码,原始密码有点长
cat /var/log/mysqld.log | grep password
登录,输入原始密码
msyql -uroot -p
set global validate_password_length=6;
set global validate_password_policy=0;
set password for 'root'@'localhost' = password('zzybzb');
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'zzybzb';
flush privileges;
show databases;
use mysql;
select `user`,authentication_string,`Host` from `user`;
有%符合表示可以远程连接
结束!!!
你别变得世俗,那不是你该走的路。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。