mysql80-DBA数据库学习1

news2024/11/15 12:07:01

掌握能力

核心技能

核心技能

mysql部署

官网地址www.mysql.com  或者www.oracle.com

https://dev.mysql.com/downloads/repo/yum/

Install the RPM you downloaded for your system, for example:

yum install mysql80-community-release-{platform}-{version-number}.noarch.rpm

yum repolist

(3/3): mysql80-community/x86_64/primary_db                                               | 278 kB  00:00:01     
源标识                                                   源名称                                            状态
!c7-media                                                CentOS-7 - Media                                  4,070
mysql-connectors-community/x86_64                        MySQL Connectors Community                          242
mysql-tools-community/x86_64                             MySQL Tools Community                               104
mysql80-community/x86_64                                 MySQL 8.0 Community Server                          465
repolist: 4,881

新安装了三个关于mysql的仓库

[root@localhost ~]# yum repolist all | grep mysq

[root@localhost ~]# yum repolist all | grep mysq
file:///media/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /media/repodata/repomd.xml"
正在尝试其它镜像。
mysql-cluster-7.5-community/x86_64                  MySQL Cluster 7. 禁用
mysql-cluster-7.5-community-source                  MySQL Cluster 7. 禁用
mysql-cluster-7.6-community/x86_64                  MySQL Cluster 7. 禁用
mysql-cluster-7.6-community-source                  MySQL Cluster 7. 禁用
mysql-cluster-8.0-community/x86_64                  MySQL Cluster 8. 禁用
mysql-cluster-8.0-community-debuginfo/x86_64        MySQL Cluster 8. 禁用
mysql-cluster-8.0-community-source                  MySQL Cluster 8. 禁用
mysql-cluster-innovation-community/x86_64           MySQL Cluster In 禁用
mysql-cluster-innovation-community-debuginfo/x86_64 MySQL Cluster In 禁用
mysql-cluster-innovation-community-source           MySQL Cluster In 禁用
mysql-connectors-community/x86_64                   MySQL Connectors 启用:   242
mysql-connectors-community-debuginfo/x86_64         MySQL Connectors 禁用
mysql-connectors-community-source                   MySQL Connectors 禁用
mysql-innovation-community/x86_64                   MySQL Innovation 禁用
mysql-innovation-community-debuginfo/x86_64         MySQL Innovation 禁用
mysql-innovation-community-source                   MySQL Innovation 禁用
mysql-tools-community/x86_64                        MySQL Tools Comm 启用:   104
mysql-tools-community-debuginfo/x86_64              MySQL Tools Comm 禁用
mysql-tools-community-source                        MySQL Tools Comm 禁用
mysql-tools-innovation-community/x86_64             MySQL Tools Inno 禁用
mysql-tools-innovation-community-debuginfo/x86_64   MySQL Tools Inno 禁用
mysql-tools-innovation-community-source             MySQL Tools Inno 禁用
mysql-tools-preview/x86_64                          MySQL Tools Prev 禁用
mysql-tools-preview-source                          MySQL Tools Prev 禁用
mysql57-community/x86_64                            MySQL 5.7 Commun 禁用
mysql57-community-source                            MySQL 5.7 Commun 禁用
mysql80-community/x86_64                            MySQL 8.0 Commun 启用:   465
mysql80-community-debuginfo/x86_64                  MySQL 8.0 Commun 禁用
mysql80-community-source                            MySQL 8.0 Commun 禁用

Install MySQL by the following command (for dnf-enabled systems, replace yum in the command ):

$> sudo yum install mysql-community-server

Start the MySQL server with the following command:

$> systemctl start mysqld

You can check the status of the MySQL server with the following command:

$> systemctl status mysqld
$>systemctl enable mysqld

mysql -uroot -p 登录异常,

A superuser account 'root'@'localhost is created. A password for the superuser is set and stored in the error log file. To reveal it, use the following command:

$> sudo grep 'temporary password' /var/log/mysqld.log
[root@localhost ~]# grep 'temporary password' /var/log/mysqld.log
2024-03-20T09:36:13.003622Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: !R,V#Fj8qi*P
[root@localhost ~]# mysql -uroot -p                              
Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@localhost ~]# mysql -uroot -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@localhost ~]# grep 'temporary password' /var/log/mysqld.log
2024-03-20T09:36:13.003622Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: !R,V#Fj8qi*P

!R,V#Fj8qi*P就是root密码

mysql -uroot -p

输入!R,V#Fj8qi*P

Change the root password as soon as possible by logging in with the generated, temporary password and set a custom password for the superuser account:

$> mysql -uroot -p
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';

ALTER USER 'root'@'localhost' IDENTIFIED BY 'Root@098';

国内镜像安装

mirrors.ustc.edu.cn这个是中科大的镜像系统

下载如下rpm

mysql-community-client-8.0.36-1.el7.x86_64
mysql-community-common-8.0.36-1.el7.x86_64
mysql-community-libs-8.0.36-1.el7.x86_64
mysql-community-icu-data-files-8.0.36-1.el7.x86_64
mysql-community-libs-compat-8.0.36-1.el7.x86_64
mysql-community-client-plugins-8.0.36-1.el7.x86_64
mysql-community-server-8.0.36-1.el7.x86_64

如果用centos7去装MySQL5.7 还需要额外的安装3个包

libaio.x86_64  perl.x86_64 net-tools.x86_64 

到当前下载文件的目录下

yum install -y *.rpm就会安装下载的包了

systemctl start mysqld 启动mysql

systemctl enable mysqld 开机启动mysql

netstat -anpt 查看端口号

systemctl status mysqld 查看服务启动状态

mysql -uroot -p提示登录失败

解决方法

grep  “password” /var/log/mysqld.log

[root@localhost ~]# grep "password" /var/log/mysqld.log 
2024-03-20T09:36:13.003622Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: !R,V#Fj8qi*P
[root@localhost ~]# 

在root@localhost:后的内容为mysql的root密码

mysql》show databases;报错 提示需要改密码

#mysqladmin -uroot -p'!R,V#Fj8qi*P'  password 'Qianfeng@123'

有个小警告,

或者mysql>下使用

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';

虚拟机环境这时可以做一个快照 名字为mysql安装后,后期操作混乱后可以恢复到次快照

1.rpm安装

2.源码安装

3自建mysql-yum仓库

--------------------------------------------------------------------------------------------------------------------------------

mysql忘记root密码

首先,去配置文件/etc/my.cnf):

【mysqld】

添加skip-grant-tables

重启mysql   systemctl restart mysqld

mysql -uroot -p  此时无密码

use mysql;

配置root密码为空

update user set authentication_string='' where user='root';

quit 退出

使用# 注销配置文件my.cnf的 skip-grant-tables

重启mysql systemctl restart mysqld

mysql -uroot 回车  无密码

ALTER user 'root'@'localhost' IDENTIFIED BY 'Root@098';

Root@098为新密码

为了保障,最好还是多创建一个超级特权用户:

CREATE USER '账号'@'%' IDENTIFIED BY '密码';

GRANT ALL PRIVILEGES ON *.* TO '账号'@'%' WITH GRANT OPTION;

最后刷新权限 flush privileges;

---------------------------------------------------------------------------------------------------------------------------------

数据库操作

建库:

mysql> create database discuz;
Query OK, 1 row affected (0.01 sec)

查看数据库:

show databases;

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| discuz             |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.01 sec)
mysql> create database DISCUZ;
Query OK, 1 row affected (0.01 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| DISCUZ             |
| discuz             |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
6 rows in set (0.00 sec)

mysql> 

注意:数据库的名字严格区分大小写

DISCUZ 和discuz是不同的数据库

mysql输入 “”回车“”不是执行和结束,结束需要用“;

数据库名字  不能用关键字、不能单独用数字和特殊字符、常用拼音和单词来定义。

使用某个数据库

USE +数据库名字

mysql> use discuz;
Database changed

mysql> select database();查看我在那个数据库中

mysql> select database();
+------------+
| database() |
+------------+
| discuz     |
+------------+
1 row in set (0.00 sec)

mysql> 

删除数据库drop database +名字

mysql> drop database DISCUZ;
Query OK, 0 rows affected (0.01 sec)

数据库备份

确定目录

如果是源码安装,配置文件中的配置项 datadir=/usr/local/mysql/这个目录就是后期的数据库实体目录。

yum或者rpm安装的mysql的文件默认目录为/var/lib/mysql ,这个目录为数据库的实体文件目录,

[root@localhost ~]# cd /var/lib/mysql
[root@localhost mysql]# ls
auto.cnf       binlog.000004  ca-key.pem       discuz             ibdata1       mysql            performance_schema  server-key.pem
binlog.000001  binlog.000005  ca.pem           #ib_16384_0.dblwr  ibtmp1        mysql.ibd        private_key.pem     sys
binlog.000002  binlog.000006  client-cert.pem  #ib_16384_1.dblwr  #innodb_redo  mysql.sock       public_key.pem      undo_001
binlog.000003  binlog.index   client-key.pem   ib_buffer_pool     #innodb_temp  mysql.sock.lock  server-cert.pem     undo_002
[root@localhost mysql]# 

discuz目录就是我们创建的数据库。

创建表create tables 表名

create table t1 (id int);

mysql> create table t2 (id int);
Query OK, 0 rows affected (0.03 sec)

mysql> 

表的描述说明 desc +表名

mysql> create table t2 (id int);
Query OK, 0 rows affected (0.03 sec)

mysql> create table t3 (id int,name varchar(20));
Query OK, 0 rows affected (0.03 sec)

mysql> desc t2;
+-------+------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+------+------+-----+---------+-------+
| id    | int  | YES  |     | NULL    |       |
+-------+------+------+-----+---------+-------+
1 row in set (0.01 sec)

mysql> desc t3;
+-------+-------------+------+-----+---------+-------+
| Field | Type        | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| id    | int         | YES  |     | NULL    |       |
| name  | varchar(20) | YES  |     | NULL    |       |
+-------+-------------+------+-----+---------+-------+
2 rows in set (0.01 sec)

默认值 default

key主键

null 可否为空

type 字段类型

extra 外键

表的数据插入及查询  select insert  

insert 字符需要用到双引号   例如"liuyang"

mysql> insert into t3 values (1,"liuyang");
Query OK, 1 row affected (0.02 sec)

mysql> insert into t3 values (2,"wangyan");
Query OK, 1 row affected (0.01 sec)

mysql> select * from t3;
+------+---------+
| id   | name    |
+------+---------+
|    1 | liuyang |
|    2 | wangyan |
+------+---------+
2 rows in set (0.00 sec)

mysql> 

综合例子

mysql> create database school;
Query OK, 1 row affected (0.01 sec)

mysql> use school;
Database changed
mysql> create table student1 (id int,
    -> name varchar(20),
    -> sex enum('m','f'),
    -> age int);
Query OK, 0 rows affected (0.09 sec)

mysql> desc student1;
+-------+---------------+------+-----+---------+-------+
| Field | Type          | Null | Key | Default | Extra |
+-------+---------------+------+-----+---------+-------+
| id    | int           | YES  |     | NULL    |       |
| name  | varchar(20)   | YES  |     | NULL    |       |
| sex   | enum('m','f') | YES  |     | NULL    |       |
| age   | int           | YES  |     | NULL    |       |
+-------+---------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

mysql> insert into student1 values (1,'zhangsan','m',23);
Query OK, 1 row affected (0.01 sec)

mysql> insert into student1 values (2,'lisi','f',22);
Query OK, 1 row affected (0.00 sec)

mysql> insert into student1 values (3,'wangwu','v',22);
ERROR 1265 (01000): Data truncated for column 'sex' at row 1
mysql> insert into student1 values (3,'wangwu','m',22);
Query OK, 1 row affected (0.01 sec)

mysql> select * from student1;
+------+----------+------+------+
| id   | name     | sex  | age  |
+------+----------+------+------+
|    1 | zhangsan | m    |   23 |
|    2 | lisi     | f    |   22 |
|    3 | wangwu   | m    |   22 |
+------+----------+------+------+
3 rows in set (0.00 sec)

mysql> 

DQL查询

创造数据


mysql> create database haha;
Query OK, 1 row affected (0.01 sec)

mysql> use haha;
Database changed
mysql> create table t3 (id int,name varchar(20),age int);
Query OK, 0 rows affected (0.03 sec)

mysql> insert into t3 values values (1,'zhangsan',23);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'values (1,'zhangsan',23)' at line 1
mysql> insert into t3 values (1,'zhangsan',23);
Query OK, 1 row affected (0.01 sec)

mysql> insert into t3 values (2,'lisi',24);
Query OK, 1 row affected (0.00 sec)

mysql> insert into t3 values (3,'wangwu',18);
Query OK, 1 row affected (0.00 sec)

mysql> 

create




mysql> create database company;
Query OK, 1 row affected (0.01 sec)

mysql> create table company.employee5(
id int primary key AUTO_INCREMENT not null,
name varchar(30) not null,
sex enum('male','female') default 'male' not null,
hire_date date not null,
post varchar(50) not null,
job_description varchar(100),
salary double(15,2) not null,
office int,
dep_id int);
mysql> desc company.employee5
    -> ;
+-----------------+-----------------------+------+-----+---------+----------------+
| Field           | Type                  | Null | Key | Default | Extra          |
+-----------------+-----------------------+------+-----+---------+----------------+
| id              | int                   | NO   | PRI | NULL    | auto_increment |
| name            | varchar(30)           | NO   |     | NULL    |                |
| sex             | enum('male','female') | NO   |     | male    |                |
| hire_date       | date                  | NO   |     | NULL    |                |
| job_description | varchar(100)          | YES  |     | NULL    |                |
| salary          | double(15,2)          | NO   |     | NULL    |                |
| office          | int                   | YES  |     | NULL    |                |
| dep_id          | int                   | YES  |     | NULL    |                |
+-----------------+-----------------------+------+-----+---------+----------------+
8 rows in set (0.00 sec)

mysql> 

insert

insert into company.employee5(name,sex,hire_date,post,job_description,salary,office,dep_id) values
('jack','male','20180202','instructor','teach',5000,501,100),
('tom','male','20180203','instructor','teach',5500,501,100),
('robin','male','20180202','instructor','teach',8000,501,100),
('alice','female','20180202','instructor','teach',7200,501,100),
('tianyun','male','20180202','hr','hrcc',600,502,101),
('harry','male','20180202','hr',NULL,6000,502,101),
('emma','female','20180206','sale','salecc',20000,503,102),
('christine','female','20180205','sale','salecc',2200,503,102),
('zhuzhu','male','20180205','sale',NULL,2200,503,102),
('gougou','male','20180205','sale','',2200,503,102);

select

mysql> select * from company.employee5;
+----+-----------+--------+------------+------------+-----------------+----------+--------+--------+
| id | name      | sex    | hire_date  | post       | job_description | salary   | office | dep_id |
+----+-----------+--------+------------+------------+-----------------+----------+--------+--------+
|  1 | jack      | male   | 2018-02-02 | instructor | teach           |  5000.00 |    501 |    100 |
|  2 | tom       | male   | 2018-02-03 | instructor | teach           |  5500.00 |    501 |    100 |
|  3 | robin     | male   | 2018-02-02 | instructor | teach           |  8000.00 |    501 |    100 |
|  4 | alice     | female | 2018-02-02 | instructor | teach           |  7200.00 |    501 |    100 |
|  5 | tianyun   | male   | 2018-02-02 | hr         | hrcc            |   600.00 |    502 |    101 |
|  6 | harry     | male   | 2018-02-02 | hr         | NULL            |  6000.00 |    502 |    101 |
|  7 | emma      | female | 2018-02-06 | sale       | salecc          | 20000.00 |    503 |    102 |
|  8 | christine | female | 2018-02-05 | sale       | salecc          |  2200.00 |    503 |    102 |
|  9 | zhuzhu    | male   | 2018-02-05 | sale       | NULL            |  2200.00 |    503 |    102 |
| 10 | gougou    | male   | 2018-02-05 | sale       |                 |  2200.00 |    503 |    102 |
+----+-----------+--------+------------+------------+-----------------+----------+--------+--------+
10 rows in set (0.00 sec)

select 排序

order by 

例如  +asc升序 默认

select name,salary from company.employee5 order by salary asc; 按照salary升序排列。

mysql> select name,salary from company.employee5 order by salary asc;
+-----------+----------+
| name      | salary   |
+-----------+----------+
| tianyun   |   600.00 |
| christine |  2200.00 |
| zhuzhu    |  2200.00 |
| gougou    |  2200.00 |
| jack      |  5000.00 |
| tom       |  5500.00 |
| harry     |  6000.00 |
| alice     |  7200.00 |
| robin     |  8000.00 |
| emma      | 20000.00 |
+-----------+----------+
10 rows in set (0.00 sec)

desc 降序

mysql> select name,salary from company.employee5 order by salary desc;
+-----------+----------+
| name      | salary   |
+-----------+----------+
| emma      | 20000.00 |
| robin     |  8000.00 |
| alice     |  7200.00 |
| harry     |  6000.00 |
| tom       |  5500.00 |
| jack      |  5000.00 |
| christine |  2200.00 |
| zhuzhu    |  2200.00 |
| gougou    |  2200.00 |
| tianyun   |   600.00 |
+-----------+----------+
10 rows in set (0.00 sec)

limit 3 限制,只输出3行

mysql> select name,salary from company.employee5 order by salary desc limit 4;
+-------+----------+
| name  | salary   |
+-------+----------+
| emma  | 20000.00 |
| robin |  8000.00 |
| alice |  7200.00 |
| harry |  6000.00 |
+-------+----------+
4 rows in set (0.00 sec)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1539131.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Python代码实现Excel表格转HTML文件

Excel工作簿是常用的表格格式,广泛用于组织、分析及展示数据。Excel文件通常需要专门的文档阅览器进行查看。如果我们想要以更兼容的方式展示Excel表格,可以将其转换为HTML格式,使其能够在各种浏览器中直接进行查看。同时,将Excel…

政安晨:【深度学习实践】【使用 TensorFlow 和 Keras 为结构化数据构建和训练神经网络】(六)—— 二元分类

政安晨的个人主页:政安晨 欢迎 👍点赞✍评论⭐收藏 收录专栏: 政安晨的机器学习笔记 希望政安晨的博客能够对您有所裨益,如有不足之处,欢迎在评论区提出指正! 这篇文章咱们将深度学习应用到另一个常见任务中。 前言 在…

基于Matlab的眼底图像血管分割,Matlab实现

博主简介: 专注、专一于Matlab图像处理学习、交流,matlab图像代码代做/项目合作可以联系(QQ:3249726188) 个人主页:Matlab_ImagePro-CSDN博客 原则:代码均由本人编写完成,非中介,提供…

前端应用开发实验:条件渲染和循环渲染

目录 实验目的相关知识点实验内容图片的隐藏和显示代码实现效果 电影票房排序代码实现效果 代办事项记录代码实现效果 实验目的 (1)熟练掌握v-on 指令的用法,学会使用v-on 指令监听DOM元素的事件,并通过该事件触发调用事件处理程序。 (2)掌握v-on指令修…

FFmepg--AVFilter过滤器使用以及yuv视频裁剪

文章目录 AVFilter 流程:api核心代码变量yuv视频裁剪AVFilter 流程: ⾸先使⽤split滤波器将input流分成两路流(main和tmp),然后分别对两路流进⾏处理。对于tmp流,先经过crop滤波器进⾏裁剪处理,再经过flip滤波器进⾏垂直⽅向上的翻转操作,输出的结果命名为flip流。再将…

【技术栈】Redis 中的事务及持久化方式

SueWakeup 个人主页: SueWakeup 系列专栏:学习技术栈 个性签名:保留赤子之心也许是种幸运吧 本文封面由 凯楠📸 友情提供 目录 相关传送门 1. Redis 中的事务 2. Redis 持久化 2.1 RDB 方式 2.1.1 RDB手动 2.1.2 RDB自动 2.…

百度地图的使用(js,vue2,vue3)

百度地图的使用 创建应用获取密钥ak ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key 一、原生js使用百度地图 引入<script type"text/javascript" src"https://api.map.baidu.com/api?v1.0&typewebgl&ak你的ak&…

后端系统开发之——功能完善

原文地址&#xff1a;https://blog.yiming1234.cn/?p830 下面是正文内容&#xff1a; 前言 通过SpringBoot开发用户模块的部分也就差不多要结束了&#xff0c;这一片文章就主要提一些在系统开发中需要注意到的细节部分和功能&#xff0c;也就是剩余的部分。 但是这个专栏只介…

一键掌控:Shell脚本自动化安装与管理Conda环境的艺术

前面写了个博客《conda&#xff1a;解决多项目开发环境配置的神器&#xff01;》简单介绍了 Conda 的安装和基本命令&#xff0c;在做开发时经常会使用 Conda 建立多个应用环境&#xff0c;Conda 的命令虽不复杂&#xff0c;但还是有时会弄混&#xff0c;所以就考虑写个脚本&am…

pyrealsense2获取保存点云

一、第一种实现代码 Python import sys import cv2 import pyrealsense2 as rs import numpy as np import keyboard import open3d as o3d import osif __name__ "__main__":output_folder output_data/os.makedirs(output_folder, exist_okTrue)pipeline rs.p…

Prometheus+Grafana 监控Tongweb嵌入式(by lqw)

文章目录 1.思路2.部署准备3.Grafana仪表盘json文件下载4.tw嵌入式jar包本地引入依赖并测试运行5.运行jmx_prometheus_javaagent-0.19.0.jar形式获取监控数据&#xff08;方法一&#xff09;6.使用Actuator 获取监听数据&#xff08;方法二&#xff09;7.Prometheus部署8.Prome…

项目配置之道:优化Scrapy参数提升爬虫效率

前言 在当今信息时代&#xff0c;数据是无处不在且无比重要的资源。为了获取有效数据&#xff0c;网络爬虫成为了一项至关重要的技术。Scrapy作为Python中最强大的网络爬虫框架之一&#xff0c;提供了丰富的功能和灵活的操作&#xff0c;让数据采集变得高效而简单。本文将以爬…

算法打卡day25|回溯法篇05|Leetcode 491.递增子序列、46.全排列、47.全排列 II

算法题 Leetcode 491.递增子序列 题目链接:491.递增子序列 大佬视频讲解&#xff1a;递增子序列视频讲解 个人思路 和昨天的子集2有点像&#xff0c;但昨天的题是通过排序&#xff0c;再加一个标记数组来达到去重的目的。 而本题求自增子序列&#xff0c;是不能对原数组进行…

Prometheus+Grafana 监控Tongweb7(by lqw)

文章目录 1.准备工作2.Tongweb7部署3.Prometheus部署4.上传jar包并配置Tongweb75.Prometheus配置6.安装和配置Grafana 1.准备工作 本次参考&#xff1a;Prometheus监控Tongweb容器 1.使用虚拟机ip&#xff1a;192.168.10.51&#xff08;tongweb&#xff09;&#xff0c;192.1…

oracle设置主键自增步骤

设置主键自增步骤&#xff1a; 每一张表都要设置序列&#xff0c;然后设置触发器。比mysql繁琐。 一、设置序列 选中表后&#xff0c;—》 文件—》新建—》其他—》序列. 设置如下四个值即可。 crtls保存。 给序列起个名字&#xff0c;一定要全大写字母。 二、设置触发器…

防火墙在解决方案及典型项目中的应用

防火墙在解决方案及典型项目中的应用 防火墙作为基础安全防护产品&#xff0c;在各种解决方案、业务场景中配套应用&#xff0c;本节给出各类方案资料链接方便查阅。 防火墙在华为网络解决方案中的应用 解决方案 文档 主要应用 CloudFabric云数据中心网解决方案 资料专区…

java设计模式(2)---六大原则

设计模式之六大原则 这篇博客非常有意义&#xff0c;希望自己能够理解的基础上&#xff0c;在实际开发中融入这些思想&#xff0c;运用里面的精髓。 先列出六大原则&#xff1a;单一职责原则、里氏替换原则、接口隔离原则、依赖倒置原则、迪米特原则、开闭原则。 一、单一职…

Java中调用由C/C++实现的本地库(JNI本地程序调用)

文章目录 背景介绍什么是JNI&#xff1f;什么是本地库&#xff1f;开发Java使用JNI本地库步骤 编写Java类实现JNI本地调用windows系统下编译动态链接库创建Java项目&#xff08;demo&#xff09;第一步&#xff1a;编写带有native的Java类第二步&#xff1a;javac生成NativeDem…

C++的缺省参数,函数重载,引用

目录 1、缺省参数&#xff08;不能在函数声明和定义中同时出现&#xff0c;若声明和定义是分开的&#xff0c;则缺省参数放在声明里面&#xff09; 1.1、缺省参数的概念 1.2、全缺省 1.3、半缺省 2、函数重载 2.1、特殊情况 2.2、特殊情况 2.3、为什么C支持函数重载而C语…

springboot+itextpdf+thymeleaf+ognl根据静态模版文件实现动态生成pdf文件并导出demo

第一步&#xff1a;导入maven依赖 <!-- 导出为PDF依赖包 --><dependency><groupId>com.itextpdf</groupId><artifactId>itextpdf</artifactId></dependency><dependency><groupId>com.itextpdf</groupId><art…