当前位置:网站首页>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;
边栏推荐
猜你喜欢
最多可以参加的会议数目[贪心 + 优先队列]
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!!!
Vulnhub's funfox2
Opencv学习笔记 高动态范围 (HDR) 成像
9 atomic operation class 18 Rohan enhancement
Compiler optimization (4): inductive variables
Is PMP beneficial to work? How to choose a reliable platform to make it easier to prepare for the exam!!!
CIS芯片测试到底怎么测?
Data island is the first danger encountered by enterprises in their digital transformation
Classification automatique des cellules de modules photovoltaïques par défaut dans les images de lecture électronique - notes de lecture de thèse
随机推荐
sql 常用优化
Semantic SLAM源码解析
MSE API learning
MSE API学习
Boot 和 Cloud 的版本选型
ASP. Net kindergarten chain management system source code
PMP對工作有益嗎?怎麼選擇靠譜平臺讓備考更省心省力!!!
mysql 的一些重要知识
mock.js从对象数组中任选数据返回一个数组
Cloud 组件发展升级
841. String hash
Ways to improve the utilization of openeuler resources 01: Introduction
JVM GC garbage collection brief
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
pom.xml 配置文件标签作用简述
Force buckle 1232 Dotted line
Open source heavy ware! Chapter 9 the open source project of ylarn causal learning of Yunji datacanvas company will be released soon!
Chapter 20 using work queue manager (3)
Automatic classification of defective photovoltaic module cells in electroluminescence images-論文閱讀筆記
编译器优化那些事儿(4):归纳变量