Read about sql server synchronous replication, The latest news, videos, and discussion topics about sql server synchronous replication from alibabacloud.com
protected] identified by ' Hello ';Next back up the data on master, first execute the following SQL statement:FLUSH TABLES with READ LOCK;Then the synchronized data tar is packaged, then SCP to 227 on that machine, decompression, attention to permissions issuesAfter the entire step is completed, the executionUNLOCK TABLES3. From:Configure the slave my.cnf:[Mysqld] #configure master-slaveserver-id=2#master-host=192.168.74.225#master-user=rep#master-pa
Test environment: Host: Database SQL SERVER08 r2 system Windows Server R2 IP192.168.1.202Cong: Database SQL Server12 system Windows IP192.168.1.100Implementation steps: 1, first on the master-slave machine to add user sqladmin, Password * * * *, and set up under the Administeator (host for example)2. Turn off the master and the firewall3, set the startup type of
Label:In today's scale OLTP system, it is a good way to solve the problem by replicating multiple copies in order to alleviate the single point of reading and writing pressure in the database, especially the read pressure.The SQL Server transactional replication transactional Replication is the most common form of
SQLServer2008 is able to see the subscription to Oracle or DB2 when the subscription is being placed, but there is no indirect interface for copying to MySQL.The end of the test, through MySQL ODBC driver, is able to implement the SQLServer2008 copy to MySQL, thus implementing the schema from the library is SQL Server, read-only library for MySQL.Firstly, a general distribution and release database is requi
statement of the error can be seen in the itemSlave_io_running: Connect to the main library and read logs from the main library to local, generate local log filesSlave_sql_running: Reads the local log file and executes the SQL command in the log.At this time, many online will teach to use set global sql_slave_skip_counter=n; Settings, but the execution of this statement will be an error because the gtid-mode=on is activated.Workaround: Skip the state
configuration file (executed at the Distributor on any database) exec sp_add_agent_parameter
@profile_id = one --the ID of the profile
, @parameter_name = ' resolverstate ' --parameter name
, @parameter_value = 1 --parameter value Change the parameters of the agent configuration file (executed at the Distributor on any database) exec sp_change_agent_parameter
@profile_id = one --The ID of the configuration file
, @parameter_name = ' resolverstate ' -- Parameter name
, @paramete
-ignore-db = mysql
# Master configure
Datadir =/var/lib/mysql
Socket =/var/lib/mysql. sock
The maser id should be 1, indicating the log directory, synchronized database, and databases that cannot be synchronized
Then add an account on the Master for synchronization, as shown below:Grant replication slave on *. * TO rep@192.168.74.227 identified by 'hello ';If you want to have the permission to execute the "load table from master" or "load data from
correspond to the information of your master respectively.
FAQs:
1. Slave_IO_State in show slave status: Waiting to reconnect after a failed registration on master
Solution:
Run
Grant replication slave on *. * to 'repl' @ '%' identified by 'Password ';
Flush privileges;
Then stop slave and start slave again.
2. Slave_IO_Running: No in show slave status
Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL
Distributed replicated Block Device (DRBD) is a software-free, shared-sharing, storage-replication solution that mirrors the contents of a piece of equipment between servers.
Data mirroring: Real-time, transparent, synchronous (returned after all successful servers), asynchronous (returned after the local server succeeds)
DRBD's core functionality is implemente
--user=mysql--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data7. Modify the permissions in MySQL data directoryChown-r Mysql.mysql DataService mysqld Start8. Import and export of dataImport: MySQL--default-character-set=utf8 MAIN Export: mysqldump--default-character-set=utf8 MAIN > Main.sql9. Add slave user to master library and set password and access rightsMysql>grant REPLICATION SLAVE On * * to [e-mail protected] "%" identified by ' 123456 '
But I think this feature is also useful for setting up a backup server or a test server.
On a single machine to publish services, you can subscribe to other machines in the SQL, according to your release of different conditions, you can make a timed synchronization, real-time synchronization, synchronization and other different publications and subscriptions.
T
Tags: MariaDB primary master Synchronous replicationmariadb Main Master synchronization, that is, two mariadb between the main from, each mariadb are dominated, from the dual role. 1. MARIADB01 ConfigurationVi/etc/my.cnf.d/server.cnf[Mysqld]Server-id = 1Log-bin = Master-logRelay-log = Slave-logAuto_increment_offset = 1Auto_increment_increment = 22. MARIADB02 ConfigurationVi/etc/my.cnf.d/server.cnf[Mysqld]
/localhost.localdomain.piddatadir=/home/fuyouling/mutl_mysql/mysql_3307/mysql/User=rootCharacter_set_server=utf8Lower_case_table_names=1max_connections=300server_id=2Replicate-do-db=testRelay-log=slave-relay-binRelay-log-index=slave-relay-bin.indexRpl_semi_sync_slave_enabled=1 #新添加Note: Remember to restart master-slave mysql When you are finished configuring.4. master-Slave semi-synchronous configuration is complete, the following tests:Execute on the
Tags: tin pre ATI Subscription. NET stat Func PSU startOriginal: SQL Server transactional replication uses scripts to add publications for an object--use [Publish library]--Add Table: Create the project and add it to the publication exec sp_addarticle @publication = n ' replicationname ', @article = N ' MyObject ', @sourc E_owner = n ' dbo ', @source_object = N '
Label:? I. master-slave replication • A. Primary server: ~/work/mongodb-osx-x86_64-2.6.2/bin/mongod--dbpath./db/--logpath./log--logappend--fork --port 27017--master--oplogsize=64 • B. from the server:./mongod--dbpath. /db/--logpath. /log/s.log--fork--port 27018--slave--slavedelay 5--autoresync--source localhost:27017 • C. startup options • --master, sp
, Ignore_dup_key = off, Allow_row_locks = on, allow_page_locks = ON) O N [PRIMARY]) on [PRIMARY]GOThen: Insert into Table1 (filed1,filed2) Select Filed1,filed2 from Table2 (this is definitely not a correct notation, self-increment ID problem)thus: SET IDENTITY_INSERT [Table_1] on INSERT to Table1 (id,filed1,filed2) Select Id,filed1,filed2 from Table1 SET IDENTITY _insert [Table_1] Off (SET identity_insert [table_1] on | | OFF allows an explicit value to be inserted into the identity column of th
* *---ningoo (nanjing) All rights reserved 2004.12---* *I just got to work this morning and found the error in the Sync Replication Log Agent: The process could not execute ' sp_replcmds ' in ' servername '.
After searching the internet, I found some relevant information:
A bug can cause this error to occur before SQL Server SP2. http://support.microsoft.com/kb
1: When a new table does not exist (that is, copy the data while creating a new table with the same structure as the old table) SELECT * to dbo.tablebackup from Dbo.tablenamewhere ID between 0 and 20 2: The new table already exists, inserting data from the old table. (Note: The primary key does not replicate) INSERT into Dbo.tablebackup (Col1,col2,col3,col4 ...) SELECT Col1,col2,col3,col4 ... From Dbo.tablenamewhere ID between 0 and 20 SQL
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.