Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Pure VPN - Up to 27 Months
vgp
Updated:
Today at 8:10 AM
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
Saturday at 11:44 PM
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Mysql master - master database replication
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="Honey Bunch" data-source="post: 28854333" data-attributes="member: 569484"><p>Chat gpt eken ahuwama mehema kiyanne aniwa chatgpt ekath ekka oka lesiyen kara ganna pluwan wei</p><p></p><p>MySQL master-master replication, also known as bi-directional replication, is a configuration where two or more MySQL database servers are set up to act as both master and slave simultaneously. This setup allows for data to be replicated and synchronized between multiple database servers, providing redundancy and high availability.</p><p></p><p>Here's an overview of the steps to set up MySQL master-master replication:</p><p></p><p>1. **Configure server IDs**: Each MySQL server participating in replication must have a unique server ID. You can set the server ID in the MySQL configuration file (my.cnf) on each server.</p><p></p><p>2. **Enable binary logging**: Binary logging is required for replication. Ensure that the `log_bin` directive is uncommented in the configuration file, and set a unique `server-id` and `log_bin` file name for each server.</p><p></p><p>3. **Create replication user**: Create a dedicated user on each server that will be used for replication. This user should have the necessary privileges to read and write the replicated data. For example, you can create a user named `replication_user` with appropriate privileges.</p><p></p><p>4. **Configure replication settings**: On each server, add the replication configuration settings to the my.cnf file. The settings include `server-id`, `log_bin`, `binlog_do_db` (specify the databases to replicate), and `replicate-do-db` (specify the databases to apply replication).</p><p></p><p>5. **Restart MySQL**: Restart the MySQL service on each server to apply the configuration changes.</p><p></p><p>6. **Initialize replication**: Choose one server as the initial source of data. On the other server(s), use the `CHANGE MASTER TO` statement to configure replication, specifying the master server's IP address, port, replication user, and password.</p><p></p><p>7. **Start replication**: On each server, use the `START SLAVE` statement to start the replication process. Verify the replication status using the `SHOW SLAVE STATUS` command.</p><p></p><p>8. **Test replication**: Make changes to the databases on either server and verify that the changes are replicated to the other server(s). Monitor the replication status regularly to ensure it is working correctly.</p><p></p><p>It's important to note that setting up master-master replication requires careful planning and consideration of potential conflicts that may arise when simultaneous changes occur on both servers. It's recommended to use an application-level conflict resolution mechanism or design the system in a way that avoids conflicts, such as using separate database schemas for each server or implementing sharding.</p><p></p><p>Additionally, it's crucial to have a robust backup and disaster recovery strategy in place to safeguard your data in case of failures or data corruption.</p><p></p><p>Please keep in mind that the specific configuration steps may vary depending on your MySQL version and the operating system you are using. Always refer to the official MySQL documentation or consult a MySQL expert for detailed instructions tailored to your environment.</p></blockquote><p></p>
[QUOTE="Honey Bunch, post: 28854333, member: 569484"] Chat gpt eken ahuwama mehema kiyanne aniwa chatgpt ekath ekka oka lesiyen kara ganna pluwan wei MySQL master-master replication, also known as bi-directional replication, is a configuration where two or more MySQL database servers are set up to act as both master and slave simultaneously. This setup allows for data to be replicated and synchronized between multiple database servers, providing redundancy and high availability. Here's an overview of the steps to set up MySQL master-master replication: 1. **Configure server IDs**: Each MySQL server participating in replication must have a unique server ID. You can set the server ID in the MySQL configuration file (my.cnf) on each server. 2. **Enable binary logging**: Binary logging is required for replication. Ensure that the `log_bin` directive is uncommented in the configuration file, and set a unique `server-id` and `log_bin` file name for each server. 3. **Create replication user**: Create a dedicated user on each server that will be used for replication. This user should have the necessary privileges to read and write the replicated data. For example, you can create a user named `replication_user` with appropriate privileges. 4. **Configure replication settings**: On each server, add the replication configuration settings to the my.cnf file. The settings include `server-id`, `log_bin`, `binlog_do_db` (specify the databases to replicate), and `replicate-do-db` (specify the databases to apply replication). 5. **Restart MySQL**: Restart the MySQL service on each server to apply the configuration changes. 6. **Initialize replication**: Choose one server as the initial source of data. On the other server(s), use the `CHANGE MASTER TO` statement to configure replication, specifying the master server's IP address, port, replication user, and password. 7. **Start replication**: On each server, use the `START SLAVE` statement to start the replication process. Verify the replication status using the `SHOW SLAVE STATUS` command. 8. **Test replication**: Make changes to the databases on either server and verify that the changes are replicated to the other server(s). Monitor the replication status regularly to ensure it is working correctly. It's important to note that setting up master-master replication requires careful planning and consideration of potential conflicts that may arise when simultaneous changes occur on both servers. It's recommended to use an application-level conflict resolution mechanism or design the system in a way that avoids conflicts, such as using separate database schemas for each server or implementing sharding. Additionally, it's crucial to have a robust backup and disaster recovery strategy in place to safeguard your data in case of failures or data corruption. Please keep in mind that the specific configuration steps may vary depending on your MySQL version and the operating system you are using. Always refer to the official MySQL documentation or consult a MySQL expert for detailed instructions tailored to your environment. [/QUOTE]
Insert quotes…
Verification
Dahaya deken beduwama keeyada?
Post reply
Top
Bottom