安装Redis
- dnf list redis
- dnf install redis
- systemctl enable redis
- systemctl start redis
安装MySQL
安装与删除数据库
- rpm -qa | grep mariadb
- dnf remove mariadb-server -y
- dnf install mariadb mariadb-server -y
- systemctl restart mariadb
- systemctl enable mariadb
- mysqladmin -u root password '密码' 添加密码
创建用户与授权
- 创建用户并指定远程登录的IP地址
create user '用户名'@'IP地址' identified by '密码'; - 创建用户任意远程地址都可以访问
create user '用户名'@'%' identified by '密码'; - 赋予权限
grant 权限 on 数据库.表 to '用户'@'IP地址';
grant select,insert,update on axf.* to 'lucky'@'%'; 赋予lucky用户axf库下所有表的增改查的权限
grant all on axf.* to 'lucky'@'%';