yum安装mysql5.7

麻瓜式安装,一步步执行就行了.

安装wget

yum -y install wget

安装mysql源安装包

 wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm

安装mysql源

yum localinstall mysql57-community-release-el7-8.noarch.rpm

查看源有没有安装成功

yum repolist enabled | grep "mysql.*-community.*"

安装mysql服务

yum install mysql-community-server 

启动mysql

systemctl start mysqld  

查看mysql状态

systemctl status mysqld  

设置自动启动

systemctl enable mysqld 

重载服务

systemctl daemon-reload 

查看mysql初始密码

grep 'temporary password' /var/log/mysqld.log  

连接mysql

mysql -uroot -p password

设置新密码

set password for 'root'@'localhost'=password('Abc@123456'); 

允许sqlyog等可视化连接工具连接

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Abc@123456';

退出当前连接

exit

退出当前连接,重启mysql.

systemctl restart mysqld
发布了4 篇原创文章 · 获赞 0 · 访问量 877
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览