#卸载之前的版本
yum remove mariadb mariadb-server
#安装最新版mariadb
vim /etc/yum.repos.d/MariaDB.repo
#添加以下内容 (这里使用的是国内中科大的源,速度快)
# MariaDB 10.4 CentOS repository list - created 2020-01-04 13:32 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://mirrors.ustc.edu.cn/mariadb/yum/10.4/centos7-amd64/
gpgkey=http://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
#清除 yum 缓存
yum clean all
yum makecache
#安装 MariaDB 新版本
yum install MariaDB-server MariaDB-client
#配置服务自启动
systemctl enable mariadb
#启动mariadb
systemctl start mariadb
#设置mariadb密码
mysql -u root -p
#然后直接回车进入修改密码
ALTER user 'root'@'localhost' IDENTIFIED BY '123456';
#创建用户
create user 'blog'@'localhost' identified by '123456';
#用户授权
grant all on wordpress.* to 'blog'@'localhost';
#创建存储过程
CREATE PROCEDURE data_insert ()
BEGIN
#定义变量
DECLARE i INT DEFAULT 0;
WHILE i<100
DO
#SQL
INSERT INTO my_table set uid=1, res_id=i,update_time=0,input_time=0;
#变量增加
SET i=i+1;
END WHILE ;
commit;
END;
"proxy_temp_file_write_size" must be equal to or greater than the maximum of the value of "proxy_buffer_size" and one of the "proxy_buffers" in /usr/local/nginx/config/nginx.conf:134