赞
踩
下载mysql
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server
如果上面安装失败执行下面这两条 重新安装
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
yum -y install mysql-community-server
启动
systemctl start mysqld
systemctl status mysqld
修改密码
grep "password" /var/log/mysqld.log
出来的结果一行 最后就是密码
复制密码
mysql -uroot -p
输入密码 连接数据库
修改密码
ALTER USER 'root'@'localhost' IDENTIFIED BY '你的密码';
开启远程连接
grant all privileges on *.* to 'root'@'%' identified by '你的密码' with grant option;
刷新
flush privileges;
执行完以上退出mysql连接
exit
有问题联系 更多功能
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。