当前位置:网站首页>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;
边栏推荐
- 使用高斯Redis实现二级索引
- 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
- Flink并行度和Slot详解
- 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
- 最多可以参加的会议数目[贪心 + 优先队列]
- Force buckle 599 Minimum index sum of two lists
- 第二十章 使用工作队列管理器(三)
- Force buckle 1961 Check whether the string is an array prefix
- Force buckle 643 Subarray maximum average I
- 干货分享|DevExpress v22.1原版帮助文档下载集合
猜你喜欢

使用高斯Redis实现二级索引

Open source heavy ware! Chapter 9 the open source project of ylarn causal learning of Yunji datacanvas company will be released soon!

Yolov6:yolov6+win10--- train your own dataset

Cloud component development and upgrading

mock.js从对象数组中任选数据返回一个数组

【STL】vector

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

Force buckle 2319 Judge whether the matrix is an X matrix

Navicat连接2002 - Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘解决

Force buckle 599 Minimum index sum of two lists
随机推荐
Force buckle 989 Integer addition in array form
线性基
多个线程之间如何协同
浅尝不辄止系列之试试腾讯云的TUIRoom(晚上有约,未完待续...)
Implement secondary index with Gaussian redis
gorilla官方:golang开websocket client的示例代码
Force buckle 2315 Statistical asterisk
831. KMP字符串
Chapter 9 Yunji datacanvas company won the highest honor of the "fifth digital finance innovation competition"!
mock.js从对象数组中任选数据返回一个数组
JVM class loading mechanism
Make this crmeb single merchant wechat mall system popular, so easy to use!
Visual Studio 插件之CodeMaid自动整理代码
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
MIT science and technology review article: AgI hype around Gato and other models may make people ignore the really important issues
openEuler 资源利用率提升之道 01:概论
Introduction to bit operation
LeetCode_7_5
BI的边界:BI不适合做什么?主数据、MarTech?该如何扩展?
MIT科技评论文章:围绕Gato等模型的AGI炒作可能使人们忽视真正重要的问题