Log point Replication
As mentioned above, log replication is divided into log point-based replication and GTID-based replication.
This article describes the log point-based replication process.
1. Create a replication account on the master DB server.
Create user 'repl' @ ip segment identified by 'pwd ';
Create user repl @ '192. 192.% 'identified by 'repl
performed. Findall (string [, pos [, endpos]) | re. findall (pattern, string [, flags]): searches for strings and returns all matched substrings in the form of a list. Finditer (string [, pos [, endpos]) | re. finditer (pattern, string [, flags]): searches for strings and returns an iterator that accesses each matching result (Match object) sequentially. Sub (repl, string [, count]) | re. sub (pattern, repl
~]# mysql-uroot–proot# View the location of the current binary log point mysql> show Master STATUS \g*************************** 1. Row *************************** file:mysql-bin.000090 position:120 binlog_do_db: binlog_ignore_ Db:executed_gtid_set:1 row in Set (0.00 sec) #创建从库的复制账户mysql > GRANT REPLICATION SLAVE, REPLICATION CLIENT on *. * to ' r EPL ' @ ' 192.168.199.% ' identified by ' repl '; #刷新权限mysql > FLUSH privileges
parameter, you will find that the file has been changed, but when the service is restarted, the modified configuration is not executed, and you A list of MySQL folders will find a lot of. My.cnf.swp and other intermediate files. This is because MySQL did not read the my.cnf when it was started. At this time as long as the my.cnf file permissions to change to my_new.cnf the same permissions as OK, command: chmod 644 my.cnf OK650) this.width=650; "src=" Http://images.cnitblog.com/blog/157872/2014
my.cnf file from the server parameter, you will find that the file has been changed, but when the service is restarted, the modified configuration is not executed, and you A list of MySQL folders will find a lot of. My.cnf.swp and other intermediate files. This is because MySQL did not read the my.cnf when it was started. At this time as long as the my.cnf file permissions to change to my_new.cnf the same permissions as OK, command: chmod 644 my.cnf OK(4) Ubuntu modified document content withou
Tags: os file data io art forMySQL has an IO thread from the library that takes binlog from the main library to write locally. Another SQL thread is responsible for performing these local logs, enabling command replay;First, the environmentHost:Master Operating system: CentOS 5.3ip:192.168.1.222MySQL version: 5.0.77Slave machine:Slave operating system: CentOS 5.3ip:192.168.1.220MySQL version: 5.0.77 Second, create a databaseLog in to master machine and slave machine separately mysql:mysql–u
find a lot of. my.cnf.swpand other intermediate files. This is all becauseMysqlno read at startupMy.cnfthe reason. At this point, only theMy.cnfThe file permissions are changed toMy_new.cnfthe same permissions asOk, command:chmod 644 MY.CNFjustOk(4)Ubuntu modified document content without vim, it isbest to put vim on,apt-get install vim, otherwise it will be crazy. that's when I believe MySQL should be installed. 2. Configure Master master server(1) Create a user '
. my. cnf. swp and other intermediate files. This is because MySQL did not read my. cnf at startup. In this case, you only need to change the File Permission of my. cnf to the permission of my_new.cnf. The command is chmod 644 my. cnf.
(4) There is no Vim for modifying the document content in Ubuntu. It is best to install Vim and apt-get install vim. Otherwise, it will be crazy.
At this time, I believe that MySQL should be installed.
2. Configure the Master server
(1) create a user '
)-------------------------clojure.core/take([n coll])Returns a lazy seq of the first n items in coll, or all items if there are fewer than n.The repl, however, is not lazy. The printer used by the repl will, by default, print the entirety of a collection.That is why we stuffed the first billion fibonaccis into lots-o-fibs, instead of evaluating them at the REPL
!')
if match:
print match.group()
World
Split (string [, maxsplit]) | re. Split (pattern, string [, maxsplit]):Split string by matching substrings and return to the list. Maxsplit is used to specify the maximum number of splits. If not specified, all splits are performed.
import re
p = re.compile(r'\d+')
print p.split('one1two2three3four4')
Output:
['One', 'two', 'three ', 'four', '']
Findall (string [, POS [, endpos]) | re. findall (pattern, string [, flags]):Se
standby node
Sqlplus acfsrep1/773946 @ primary_acfsrep as sysasm
5. Initiate replication initialize on Standby node and Primary node
-- Initialize standby FS
Root @ qc550707:/> acfsutil repl init standby-p acfsrep1/773946 @ primary_acfsrep-c standby_acfsrep/acfsstd1
Registering with user specified service name-standby_acfsrep
-- Check that the replication on standby node has been started.
Root @ qc550707:/> acfsutil
', MASTER_LOG_POS = 6125; ---- Current Database: 'db1 '--
B) restore the master database from the slave database to remotely connect to the slave database, and use source to restore the slave database to add the master database whitelist: mysql> grant all on *. * to root@192.168.1.101 with grant option; set password: mysql> set password for root @ 'localhost' = password ('000000'); Query OK, 0 rows affected (000000 sec) add the slave database whitelist to the master database:
mysql> grant all o
matching substrings and return to the list. Maxsplit is used to specify the maximum number of splits. If not specified, all splits are performed.
import rep = re.compile(r'\d+')print p.split('one1two2three3four4')### output #### ['one', 'two', 'three', 'four', '']findall(string[, pos[, endpos]]) | re.findall(pattern, string[, flags]):
Search for strings and return all matching substrings in the form of a list.
import rep = re.compile(r'\d+')print p.findall('one1two2three3four4')### output ####
:
>>> for M in Re.finditer (' \w+ ', ' Hello, world! '):
... print m.group ()
...
Hello
World
Re.sub (Pattern, REPL, string[, Count])Replace the string, match the pattern part, replace it with REPL, replace the most count (the remaining match will not be processed), and return the replaced string. If there is no string in string that matches the patt
Mysql master-slave replication technology (test) bitsCN.com
Mysql master-slave replication technology (test)
Start configuration:
Step 1: Create a replication account
Each slave uses a standard MySQL User name and password to connect to the master. The user who performs the copy operation will grantREPLICATIONSLAVE permission.
The username and password are stored in the master.info text file. If you want to create a repl user
Mysql> grant replicatio
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.