linux下安装mysql实现远程连接
1、下载rpm包
wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
2、安装yum源
rpm -ivh mysql57-community-release-el7-9.noarch.rpm
3、yum安装
cd /etc/yum.repos.d/
yum -y install mysql-server
4、开机启动
systemctl enable mysqld
systemctl start mysqld
systemctl restart mysqld
5、获取临时密码
grep 'temporary password' /var/log/mysqld.log
6、如果没有密码,恭喜你,重来吧 详细情况
7、登录并修改密码
mysql -u root -p
密码为第6步获取的密码
共有 0 条评论