当前位置:网站首页>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;
边栏推荐
猜你喜欢
Welcome to the markdown editor
Introduction to bit operation
有了ST7008, 蓝牙测试完全拿捏住了
PMP practice once a day | don't get lost in the exam -7.7
整型int的拼接和拆分
多个线程之间如何协同
Opencv学习笔记 高动态范围 (HDR) 成像
vulnhub之school 1
Leetcode force buckle (Sword finger offer 36-39) 36 Binary search tree and bidirectional linked list 37 Serialize binary tree 38 Arrangement of strings 39 Numbers that appear more than half of the tim
The project manager's "eight interview questions" is equal to a meeting
随机推荐
Navicat连接2002 - Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘解决
Force buckle 674 Longest continuous increasing sequence
Version selection of boot and cloud
Sword finger offer II 013 Sum of two-dimensional submatrix
[sword finger offer] sword finger offer II 012 The sum of left and right subarrays is equal
Semantic slam source code analysis
力扣 1037.有效的回旋镖
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
841. String hash
openEuler 有奖捉虫活动,来参与一下?
Kubernetes——kubectl命令行工具用法详解
【哲思与实战】程序设计之道
Simulate the implementation of string class
Force buckle 2315 Statistical asterisk
ASP. Net learning & ASP's one word
华南X99平台打鸡血教程
Nunjuks template engine
MRS离线数据分析:通过Flink作业处理OBS数据
831. KMP字符串
Force buckle 2319 Judge whether the matrix is an X matrix