当前位置:网站首页>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;
边栏推荐
- JVM 类加载机制
- Browse the purpose of point setting
- Implement secondary index with Gaussian redis
- Force buckle 912 Sort array
- CUDA versions are inconsistent, and errors are reported when compiling apex
- mock. JS returns an array from the optional data in the object array
- How to cooperate among multiple threads
- 力扣 2319. 判断矩阵是否是一个 X 矩阵
- Le PGR est - il utile au travail? Comment choisir une plate - forme fiable pour économiser le cœur et la main - d'œuvre lors de la préparation de l'examen!!!
- 九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」
猜你喜欢

使用高斯Redis实现二级索引

Nunjuks template engine

数据孤岛是企业数字化转型遇到的第一道险关

openEuler 资源利用率提升之道 01:概论

九章云极DataCanvas公司摘获「第五届数字金融创新大赛」最高荣誉!

Data island is the first danger encountered by enterprises in their digital transformation

LeetCode_ 7_ five

Automatic classification of defective photovoltaic module cells in electroluminescence images-論文閱讀筆記
![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]

mysql 的一些重要知识
随机推荐
R language dplyr package select function, group_ The by function, filter function and do function obtain the third largest value of a specific numerical data column in a specified level in a specified
Flink并行度和Slot详解
力扣 643. 子数组最大平均数 I
力扣 989. 数组形式的整数加法
8 CAS
如何在软件研发阶段落地安全实践
Browse the purpose of point setting
Force buckle 643 Subarray maximum average I
使用高斯Redis实现二级索引
Data island is the first danger encountered by enterprises in their digital transformation
LeetCode_ 7_ five
力扣 459. 重复的子字符串
The boundary of Bi: what is bi not suitable for? Master data, Martech? How to expand?
MRS离线数据分析:通过Flink作业处理OBS数据
CUDA versions are inconsistent, and errors are reported when compiling apex
ASP.NET学习& asp‘s one word
831. KMP string
torch. nn. functional. Pad (input, pad, mode= 'constant', value=none) record
About cv2 dnn. Readnetfromonnx (path) reports error during processing node with 3 inputs and 1 outputs [exclusive release]
Open source heavy ware! Chapter 9 the open source project of ylarn causal learning of Yunji datacanvas company will be released soon!