当前位置:网站首页>Creation of kubernetes mysql8
Creation of kubernetes mysql8
2022-07-07 20:08:00 【Li Weilun】
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql1
namespace: default
labels:
app: mysql1
spec:
replicas: 1
selector:
matchLabels:
app: mysql1
template:
metadata:
labels:
app: mysql1
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: ip
operator: In
values:
- 172.16.12.104
containers:
- name: mysql1
envFrom:
- secretRef:
name: mysql1
image: mysql:8
args:
- "--lower_case_table_names=1"
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3306
name: 3306tcp
protocol: TCP
volumeMounts:
- mountPath: /var/lib/mysql
name: mysql1data
volumes:
- hostPath:
path: /opt/mysql1/data/
type: DirectoryOrCreate
name: mysql1data
restartPolicy: Always
mysql8 There's an important feature , Case sensitivity can only be completed when the database is initialized , So we're going to be here args Join in –lower_case_table_names=1, That is, the case is not sensitive
Create user ,mysql8 You need to create a user before you can assign permissions
use mysql;create user 'szxy_test'@'%' identified by 'Liweilun1208.';
If you forget when creating users with mysql_native_password Log in with this user and report authentication plugin 'caching_sha2_password' cannot be loaded;
alter user 'szxy_test'@'%' identified with mysql_native_password by 'Liweilun1208.';
Assign permissions
grant all privileges on *.* to 'szxy_test'@'%' with grant option;
边栏推荐
- pom.xml 配置文件标签作用简述
- BI的边界:BI不适合做什么?主数据、MarTech?该如何扩展?
- Ways to improve the utilization of openeuler resources 01: Introduction
- 【剑指offer】剑指 Offer II 012. 左右两边子数组的和相等
- gorilla官方:golang开websocket client的示例代码
- Force buckle 674 Longest continuous increasing sequence
- vulnhub之school 1
- Mysql, sqlserver Oracle database connection mode
- c语言如何判定是32位系统还是64位系统
- Force buckle 1790 Can two strings be equal by performing string exchange only once
猜你喜欢

Force buckle 2319 Judge whether the matrix is an X matrix

Nunjuks template engine

PMP practice once a day | don't get lost in the exam -7.7

ASP. Net learning & ASP's one word

LeetCode_ 7_ five

The state cyberspace Office released the measures for data exit security assessment: 100000 information provided overseas needs to be declared

力扣 2319. 判断矩阵是否是一个 X 矩阵
![About cv2 dnn. Readnetfromonnx (path) reports error during processing node with 3 inputs and 1 outputs [exclusive release]](/img/59/33381b8d45401607736f05907ee381.png)
About cv2 dnn. Readnetfromonnx (path) reports error during processing node with 3 inputs and 1 outputs [exclusive release]

LeetCode_7_5

vulnhub之school 1
随机推荐
R language ggplot2 visualization: use the ggstripchart function of ggpubr package to visualize the dot strip plot, set the position parameter, and configure the separation degree of different grouped
Flink并行度和Slot详解
R language dplyr package mutate_ At function and min_ The rank function calculates the sorting sequence number value and ranking value of the specified data column in the dataframe, and assigns the ra
Sword finger offer II 013 Sum of two-dimensional submatrix
Browse the purpose of point setting
力扣 599. 两个列表的最小索引总和
YoloV6:YoloV6+Win10---训练自己得数据集
The state cyberspace Office released the measures for data exit security assessment: 100000 information provided overseas needs to be declared
Force buckle 989 Integer addition in array form
Is PMP beneficial to work? How to choose a reliable platform to make it easier to prepare for the exam!!!
有了ST7008, 蓝牙测试完全拿捏住了
JVM class loading mechanism
Ways to improve the utilization of openeuler resources 01: Introduction
剑指 Offer II 013. 二维子矩阵的和
Cloud component development and upgrading
[auto.js] automatic script
线性基
Cloud 组件发展升级
Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"
841. String hash