Learning notes of kubernetes authoritative guide -- a small example of mysql
mysql small example
Create a mysql-rc.yaml file
apiVersion: v1
kind: ReplicationController # Replica controller RC
metadata:
name: mysql # Name of RC, globally unique
spec:
replicas: 1 # Expected number of copies
selector:
app: mysql # Pod that matches the target has this label
template: # Create a copy (instance) of Pod a ...
Added by |Adam| on Fri, 29 Nov 2019 16:27:09 +0200
spring boot and mybatis
Simplified configuration and content sublimation of spring boot and spring mvc.
How to integrate mybatis in spring boot?
Part 1: maven dependency (you can check it when creating the spring boot project)
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId&g ...
Added by harvillo on Thu, 28 Nov 2019 17:55:23 +0200
Deploying LAMP static and dynamic separation and deploying Discuz Forums
adopt LAMP Platform Deployment and Application The LAMP platform can already be deployed to meet client requests, but since these components are installed on one server, problems can paralyze the LAMP platform.In practice, it is not possible to deploy all LAMP platforms on the same server, which requires the use of LAMP dynamic and static sepa ...
Added by Swede78 on Thu, 28 Nov 2019 08:12:29 +0200
Mysql data synchronization to elastic search in Docker environment
Written in front
There are generally two principles to implement mysql data synchronization es:
The synchronization is performed through the regular query of sql statement.
elasticsearch-jdbc
[logstash JDBC] official( https://www.elastic.co/blog/l...
Use binlog for synchronization
Big God's open source project go-mysql-elasticsearch
T ...
Added by Pinkmischief on Wed, 27 Nov 2019 18:47:58 +0200
The consequence of MySQL sharing data and redo
Source of problem
The company's database product architecture is changing recently. After the tester down loads a physical machine of a distributed storage node, MySQL will be dispatched to other nodes by default. However, during the scheduling process, it was found that MySQL could not be started, so a screenshot was sent:
problem analysis
T ...
Added by cainfool on Sun, 24 Nov 2019 20:18:37 +0200
On the leftmost principle of mysql index
Building tables
CREATE TABLE `user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(10) DEFAULT NULL,
`sex` tinyint(1) DEFAULT NULL,
`age` tinyint(2) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `Index_user` (`name`,`age`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
Test sql
First kind
mysql> ...
Added by Hebbs on Sun, 24 Nov 2019 17:03:36 +0200
Verification of incremental collection of mysql by logstash
Recently, there is a need to synchronize the data in a table in mysql to es. After analysis, use the jdbc plug-in of logstash or get the data in mysql. output to es. There are two collection situations: first, full collection, then incremental collection.
Process verified as follows:
1. Install longstash and mysql
The installation of mysql and ...
Added by Flying Sagittarius on Sun, 24 Nov 2019 16:17:10 +0200
Dockerfile builds mysql image and initializes database data
Reference resources: https://www.jb51.net/article/115422.htm
1) operate in the CentOS7 environment, create the folder mymy, and create a new file Dockerfile, setup.sh, schema.sql, privileges.sql
mkdir mymy
cd mymy
touch Dockerfile
touch setup.sh
touch schema.sql
touch privileges.sql
Dockerfile:
FROM mysql:5.7
ENV MYSQL_ALLOW_EMPTY_P ...
Added by thefreebielife on Wed, 20 Nov 2019 23:00:32 +0200
Mysql5.7 + mha0.58 + RedHat 7.4 installation and deployment of HMA
Or through Https://download.csdn.net/download/xxxzhaobb/11151222 download.
1. Basic information of software and hardware
OS
Hostname
IP
Master / slave
Remarks
Redhat 7.4
Mysql1
192.168.54.230
from
Management node
...
Added by johndale on Wed, 20 Nov 2019 20:18:58 +0200
See through interface abstraction and factory
Preface
I'm going to take you through a new way to understand what interface polymorphism is. Many people, including me, feel helpless when they first learn this thing. They can't understand it. They can't understand it. They just know how to write interfaces, and then they won't be useful. I'll show you how to understand the interface through ...
Added by gmdavis on Wed, 20 Nov 2019 15:09:48 +0200