SQL审核平台Yearning安装及使用

一、前言
当谈到数据开发和数据治理平台时,无是一个备受关注的工具 。是一个面向数据开发人员和数据工程师的开源项目,它为用户提供了简单易用的数据查询和数据治理功能 。
在这篇博客中,我们将探讨的特点优势以及安装部署和如何使用它来提升数据开发和数据治理的效率 。
的特点和优势:
的介绍、背景以及特点网上都有,感兴趣的各位可以自行上网搜索,接下来走进正题开始安装及使用教学 。
二、安装 2.1、安装和配置MySQL数据库
# 首先关闭防火墙和内核安全机制[root@localhost ~]# systemctl stop firewalld[root@localhost ~]# systemctl disable firewalld[root@localhost ~]# setenforce 0[root@localhost ~]# sed -i 's/enforcing/disabled/' /etc/selinux/config# 卸载自带的mysql源[root@localhost ~]# yum list installed | grep mysql Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast[root@localhost ~]# yum list installed | grep mariadbRepodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fastmariadb-libs.x86_641:5.5.68-1.el7@anaconda[root@localhost ~]# yum -y remove mariadb-libs.x86_64[root@localhost ~]# find / -name mysql/etc/selinux/targeted/active/modules/100/mysql/usr/lib64/mysql[root@localhost ~]# rm -rf /etc/selinux/targeted/active/modules/100/mysql[root@localhost ~]# rm -rf /usr/lib64/mysql# 安装mysql-5.7.38[root@localhost ~]# wget -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm[root@localhost ~]# yum -y install mysql57-community-release-el7-10.noarch.rpm[root@localhost ~]# yum -y install mysql-community-server --nogpgcheck[root@localhost ~]# systemctl start mysqld[root@localhost ~]# systemctl enable mysqld# 登录数据库并设置密码策略修改默认密码[root@localhost ~]# grep 'temporary password' /var/log/mysqld.log2023-07-05T07:29:50.033212Z 1 [Note] A temporary password is generated for root@localhost: YS4qW5G=k=at[root@localhost ~]# mysql -uroot -pYS4qW5G=k=atmysql: [Warning] Using a password on the command line interface can be insecure........Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> set global validate_password_policy=0;Query OK, 0 rows affected (0.00 sec)mysql> set global validate_password_length=1;Query OK, 0 rows affected (0.00 sec)mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Kpt90njaG#1o';Query OK, 0 rows affected (0.00 sec)# 创建Yearning要使用的数据库mysql> CREATE DATABASE`Yearning` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;Query OK, 1 row affected (0.00 sec)mysql> show databases;+--------------------+| Database|+--------------------+| information_schema || Yearning|| mysql|| performance_schema || sys|+--------------------+5 rows in set (0.00 sec)
这段代码主要是在安装和配置MySQL数据库的过程 。以下是每个步骤的解释:
删除已安装的,并移除与MySQL相关的文件和目录 。
安装MySQL-5.7.38:通过下载MySQL社区版的RPM包(---el7-10..rpm),然后使用yum命令安装MySQL。
登录数据库并设置密码策略修改默认密码:首先,使用grep命令查看数据库初始密码;然后使用mysql命令登录MySQL数据库,修改密码策略,将密码策略验证策略设置为0,将密码最小长度设置为1;最后,使用ALTER USER语句修改root用户的密码为指定值 。
创建要使用的数据库:使用mysql命令创建一个名为""的数据库 。
【SQL审核平台Yearning安装及使用】ALTER USER 'root'@''WITH d BY '#1o';,#1o这个是你的数据库密码,可以自行修改 。
2.2、搭建
# 下载Yearning到自己的安装目录并解压# 如果下载不了,去到https://github.com/cookieY/Yearning/releases/download/网页搜索Yearning查看适用版本,然后复制链接替换我下面的链接[root@localhost ~]# wget https://github.com/cookieY/Yearning/releases/download/v3.1.5/Yearning-v3.1.5-linux-amd64.zip[root@localhost ~]# unzip Yearning-v3.1.5-linux-amd64.zip Archive:Yearning-v3.1.5-linux-amd64.zipcreating: Yearning/creating: Yearning/docker/inflating: Yearning/docker/Dockerfileinflating: Yearning/docker/README.mdinflating: Yearning/docker/docker-compose.ymlinflating: Yearning/.DS_Storeinflating: Yearning/conf.tomlinflating: Yearning/migrateinflating: Yearning/Yearning# 修改Yearning配置文件[root@localhost ~]# cd Yearning[root@localhost Yearning]# lsconf.tomldockermigrateYearning[root@localhost Yearning]# vim conf.toml[Mysql]Db = "Yearning"Host = "127.0.0.1"Port = "3306"Password = "Kpt90njaG#1o"#数据库密码User = "root"[General]SecretKey = "kpijoHesuankisjp"#随便修改为长度16位的字符,大小写均可Hours = 4QueryClient = trueQueryPort = 3307.......#其他不动# 初始化Yearning数据库[root@localhost Yearning]# ./Yearning install是否已将数据库字符集设置为UTF8/UTF8MB4? [yes|no]: yes.......初始化成功!用户名: admin密码:Yearning_admin请通过./Yearning run 运行,默认地址:http://:8000# 启动服务[root@localhost Yearning]# nohup ./Yearning run &[root@localhost Yearning]# netstat -atnplActive Internet connections (servers and established)Proto Recv-Q Send-Q Local AddressForeign AddressStatePID/Program nametcp600 :::8000:::*LISTEN22827/./Yearning# http://ip:8000访问Yearning平台(8000是默认端口)