MySql master-slave separation
Master-slave database theoretical knowledge
First step The master's operations on the data are recorded in the Binary log. Before each transaction updates the data, the master records these changes and writes them to the Binary log serially. After completing the log writing, the master notifies the storage engine to commit the transaction. T ...
Posted by telefiend on Wed, 23 Feb 2022 03:45:15 +0100
MGR management and maintenance | MGR in simple terms
The original content of GreatSQL community cannot be used without authorization. Please contact Xiaobian and indicate the source for reprint.1. Switch the master node2. Switch single master / multi master mode3. Add a new node4. Delete node5. Add back the node that exited abnormally6. Restart MGR cluster7. SummaryReferences, documentsDisclaimer ...
Posted by pixeltrace on Wed, 23 Feb 2022 03:41:31 +0100
MySQL string interception
In the development process, it is sometimes encountered that only a part of a certain field of the database is required. Sometimes, this scenario is more convenient and faster to operate directly through the database than through code. MySQL has many string functions that can be used to deal with these requirements, such as left, right, subs ...
Posted by mchannel on Wed, 23 Feb 2022 03:29:19 +0100
LeetCode 688. Knight's probability on the chessboard / 1791 Find the central node of the star chart / 969 Pancake sorting (bubble sorting)
688. Knight's probability on the chessboard
2022.2.1 one question per day
Title Description
On an n x n chess board, a knight starts from a row (column) and tries to make k moves. Rows and columns start at 0, so the upper left cell is (0,0) and the lower right cell is (n - 1, n - 1).
Chess knight has 8 possible walking methods, as shown in ...
Posted by belayet on Wed, 23 Feb 2022 03:12:34 +0100
Basic flow of C/S program based on TCP protocol
Server communication process
Server:
1,adopt socket()Function to create a to receive a connection request socket
2,To construct the host connection address sockaddr_in structural morphology,include sin_family,sin_port,sin_addr Three members
3,binding sockaddr_in Structure and socket
4,adopt listen()Function will stocket Set to listenin ...
Posted by mdemetri2 on Wed, 23 Feb 2022 02:59:37 +0100
SpringBoot2.6.x Countermeasures after disabling circular dependency by default
1, PrefaceSpringBoot 2.6.x does not recommend the use of circular dependency, which is good news. Springboot gradually guides developers to write standard code from the bottom. At the same time, it is also sad news. The application scenarios of circular dependency are too wide.If you upgrade from a lower version to 2.6 x. Then the first problem ...
Posted by iversonm on Wed, 23 Feb 2022 02:44:07 +0100
Snowflake algorithm: a sharp tool for distributed unique ID generation
prefaceWhether it is ID generation in distributed systems or the generation of unique numbers such as requesting serial numbers in business systems, it is a scenario that software developers often face. The snowflake algorithm is a solution to these scenes.Taking distributed ID as an example, its generation often requires uniqueness, increment, ...
Posted by nicolam1 on Wed, 23 Feb 2022 02:26:26 +0100
PHP file contains
File contains
Thinking: the function of PHP requires that the function must be called in memory, but the function is written in the corresponding PHP file one by one. Must the code in other files be copied to access it?
Introduction: if the corresponding function in a file has been written, if you want to use it in other PHP files, yo ...
Posted by juuuugroid on Wed, 23 Feb 2022 02:21:14 +0100
typedef enum and enum usage
typedef enum {
RESET = 0,
SET = !RESET
} FlagStatus, ITStatus;
This sentence means to alias enum {reset = 0, set =! Reset}: FlagStatus and ITStatus
The FlagStatus and ITStatus that appear after this can be regarded as enum {reset = 0, set =! Reset}
The purpose of this is to save code, improve readability, and be easy to maintain~
1. De ...
Posted by tsg on Wed, 23 Feb 2022 02:21:25 +0100
Multi table query of MyBatis
10. Multi table query of mybatis
Relational database tables are divided into
* one-on-one
* One to many
* Many to many
give an example
The ID number is one to one. A person can only have one ID number. An ID number can only belong to one person.Users and orders are one to many, and orders and users are many to one One user can place multip ...
Posted by rgermain on Wed, 23 Feb 2022 02:19:43 +0100