破解密码:
1,先重启系统,开始界面点击鼠标入进电脑,按下e键。
2.在界面中间输入rd. break . 输入Ctrl+x执行。3,输入下面命令,修改命令。
mount -o(是字母o不是数字0) remount,rw /sysroot
chroot /sysroot
passwd -d 修改密码的用户名(不输入默认为root)
(8.0默认删除密码)
touch /.autorelabel(保存文件,一定要写)
exit
exit
linux下 yum安装:
安装阿里源:
mount /dev/cdrom /mnt #挂载目录
vim /etc/yum.repos.d/redhat.repo #配置yum源
配置内容:
[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/
http://mirrors.aliyuncs.com/centos/$releasever/BaseOS/$basearch/os/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/BaseOS/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever/extras/$basearch/os/
http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/os/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/os/
http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/os/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
[PowerTools]
name=CentOS-$releasever - PowerTools - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever/PowerTools/$basearch/os/
http://mirrors.aliyuncs.com/centos/$releasever/PowerTools/$basearch/os/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/PowerTools/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
[AppStream]
name=CentOS-$releasever - AppStream - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/
http://mirrors.aliyuncs.com/centos/$releasever/AppStream/$basearch/os/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/AppStream/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
yum clean all #清除yum源缓存数据
yum makecache #重新加载yum源(这步最重要不能少,yum clean all ,yum repolist 可以省略 )
yum repolist #查看加载的yum源(黄色部分表示改的yum源)
下载wget:
#从上到下执行
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum install -y mysql57-community-release-el7-10.noarch.rpm
yum module disable mysql
yum install mysql-community-server
#取消自动更新
yum -y remove mysql57-community-release-el7-10.noarch
下载过程非常,非常慢
systemctl start mysqld.service # 查看MySQL运行状态
systemctl status mysqld.service # 如果为active则表示MySQL已经运行了