赞
踩
命令记录,未整理;
1. 下载mysql5.7的安装包,上传到linux系统某个目录中
2. 使用tar -xvf 解压 tar包
tar -xvf mysql-5.7.35-1.el7.x86_64.rpm-bundle.tar
3. 使用 rpm -ivh 安装 mysql
rpm -ivh mysql-community-common-5.7.35-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.35-1.el7.x86_64.rpm
刷新权限,然后输入改密码的命令
flush privileges;
修改密码
alter user root@localhost identified by 'Zzq123456';
systemctl stop mysqld
systemctl status mysqld
systemctl start mysqld
#binlog日志过期天数设置
#expire_logs_days=7
server-id = 1
binlog-do-db=crmeb
#binlog-do-db=
binlog-ignore-db=mysql
binlog-ignore-db=information_schema
binlog-ignore-db=performance_schema
binlog-ignore-db=sys
#expire_logs_days=7
---------------------------
show databases;
use mysql;
show tables;
CREATE USER 'zzq'@'%' IDENTIFIED BY 'Zzq123456';
GRANT ALL ON *.* TO 'zzq'@'%';
FLUSH PRIVILEGES;
------------------------------------
show databases;
use mysql;
show tables;
SELECT User, Host FROM mysql.user;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Zzq*123456' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
-----------------------------------------
查看3306端口:
netstat -talnp
-----------------------------------------
查看防火墙状态:
systemctl status firewalld
firewall-cmd --state
-----------------------------------------
虚拟机:192.168.124.101
mysql 在虚拟机上本地登录的密码:root Zzq123456
mysql 在虚拟机上远程登录的密码:root Zzq*123456
ps -ef |grep mysql
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。