当前位置:网站首页>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;
边栏推荐
- Boot 和 Cloud 的版本选型
- Ways to improve the utilization of openeuler resources 01: Introduction
- R language uses ggplot2 function to visualize the histogram distribution of counting target variables that need to build Poisson regression model, and analyzes the feasibility of building Poisson regr
- 开源重器!九章云极DataCanvas公司YLearn因果学习开源项目即将发布!
- 【哲思与实战】程序设计之道
- About cv2 dnn. Readnetfromonnx (path) reports error during processing node with 3 inputs and 1 outputs [exclusive release]
- 微信公众号OAuth2.0授权登录并显示用户信息
- Dynamic addition of El upload upload component; El upload dynamically uploads files; El upload distinguishes which component uploads the file.
- Simulate the implementation of string class
- BI的边界:BI不适合做什么?主数据、MarTech?该如何扩展?
猜你喜欢

【哲思与实战】程序设计之道

多个线程之间如何协同

Vulnhub's funfox2

Cloud 组件发展升级

微信公众号OAuth2.0授权登录并显示用户信息

ASP. Net learning & ASP's one word

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

Simulate the implementation of string class

ASP.NET学习& asp‘s one word

九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」
随机推荐
CSDN语法说明
Kubernetes——kubectl命令行工具用法详解
Vulnhub tre1
9 atomic operation class 18 Rohan enhancement
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
MSE API learning
Classification automatique des cellules de modules photovoltaïques par défaut dans les images de lecture électronique - notes de lecture de thèse
841. String hash
Version selection of boot and cloud
torch. nn. functional. Pad (input, pad, mode= 'constant', value=none) record
力扣 88.合并两个有序数组
Ways to improve the utilization of openeuler resources 01: Introduction
mysql 的一些重要知识
RESTAPI 版本控制策略【eolink 翻译】
MRS离线数据分析:通过Flink作业处理OBS数据
Cuda版本不一致,编译apex报错
Semantic slam source code analysis
mock.js从对象数组中任选数据返回一个数组
【剑指offer】剑指 Offer II 012. 左右两边子数组的和相等
The DBSCAN function of FPC package of R language performs density clustering analysis on data, checks the clustering labels of all samples, and the table function calculates the two-dimensional contin