一. wget https://dev.Mysql.com/get/mysql57-commUnity-release-el7-11.noarch.rpm 二. yum -y localinstall mysql5
一.
wget https://dev.Mysql.com/get/mysql57-commUnity-release-el7-11.noarch.rpm
二.
yum -y localinstall mysql57-community-release-el7-11.noarch.rpm
三.
yum -y install mysql-community-server
四.
systemctl start mysqld<br>ps -ef | grep mysql
五.mysql默认密码
cat /var/log/mysqld.log
登陆
mysql -uroot -pykO:DNGXx5ee
七.修改默认密码
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Qwe340721@';
设置允许远程登录
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Qwe340721@' WITH GRANT OPTioN;
退出
exit;
八.防火墙开放3306端口
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --reload
九.配置mysql默认编码为utf-8
vim /etc/my.cnf<br><br>
character_set_server=utf8
init_connect='SET NAMES utf8'
十.重启服务
systemctl restart mysqld
--结束END--
本文标题: 基于centos7快速安装mysql5.7教程解析
本文链接: https://lsjlt.com/news/9567.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0