ShiShiYiBan/script/笔记/MySQL/笔记.txt

36 lines
1003 B
Plaintext

mysqldump -u root -p123456 ruoyi-vue-pro > all_tables_backup.sql
systemctl stop firewalld.service
systemctl disable firewalld.service
一、安装mysql
yum install mysql-server
设置表名带小写敏感忽略
vim /etc/my.cnf.d/mysql-server.cnf 末尾添加lower_case_table_names=1
systemctl start mysqld #启动MYSQL 服务
systemctl enable mysqld #将MYSQL 服务设置为开机启动
mysql -uroot #新安装MYSQL 可以使用ROOT 无密码直接登录
use mysql; #选择系统数据库
alter user 'root'@'localhost' identified by '123456'; #将123456 替换成自己的密码
update user set host='%' where user='root';
flush privileges; #刷新权限表
CREATE database if NOT EXISTS `ruoyi-vue-pro` default character set utf8mb4 collate utf8mb4_general_ci;
USE `ruoyi-vue-pro`;
安装Redis
#添加EPEL仓库
sudo yum install epel-release
#更新yum源
sudo yum update
安装
yum install redis
systemctl start redis
systemctl enable redis
vim /etc/redis/redis.conf
systemctl restart redis