Mysql

Facebook Twitter

MySQL Master Master Replication. This tutorial describes how to set up MySQL master-master replication.

MySQL Master Master Replication

We need to replicate MySQL servers to achieve high-availability (HA). In my case I need two masters that are synchronized with each other so that if one of them drops down, other could take over and no data is lost. Similarly when the first one goes up again, it will still be used as slave for the live one. Here is a basic step by step tutorial, that will cover the mysql master and slave replication and also will describe the mysql master and master replication. Notions: we will call system 1 as master1 and slave2 and system2 as master2 and slave 1.

Load Balancing and MySQL Master and Slaves (Articles) If you are currently using MySql master/slave replication for load balancing and wish to transport to cakePHP, it really couldn't be easier. 2 simple steps to master/slave replication in cake.. Firstly in app/config/database.php write the following:- How To Set Up A Load-Balanced MySQL Cluster. Version 1.0 Author: Falko Timme <ft [at] falkotimme [dot] com> Last edited 03/27/2006 This tutorial shows how to configure a MySQL 5 cluster with three nodes: two storage nodes and one management node.

How To Set Up A Load-Balanced MySQL Cluster

This cluster is load-balanced by a high-availability load balancer that in fact has two nodes that use the Ultra Monkey package which provides heartbeat (for checking if the other node is still alive) and ldirectord (to split up the requests to the nodes of the MySQL cluster). In this document I use Debian Sarge for all nodes. Therefore the setup might differ a bit for other distributions. Ultra Monkey: If you get this in MySQL Lock wait timeout exceeded; try restart. Home > MySQL > If you get this in MySQL Lock wait timeout exceeded; try restarting transaction I ran into this crap when I needed to purge a massive number of records from a database. All you need to do is edit the timeout setting in your MySQL config file.

On my Mac it is located at : /etc/my.cnf Uncomment the line: innodb_lock_wait_timeout = 50 And change the setting to 500 (its seconds) Error : Lock wait timeout exceeded; try restarting transaction - Bugs: #10641: 1205, 'Lock wait timeout exceeded; try restarting. Mysql Master Master Repliction « Nasser Heidari.

I’m going to setup MySQL Multi-Master Replication, here are my systems information: DB-1 : 172.20.1.6 —> (Master 1 / Slave 2) DB-2 : 172.20.1.8 —> (Master 2 / Slave 1) # uname -a Linux DB-1.linax.wordpress.com 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 EST 2010 x86_64 x86_64 x86_64 GNU/Linux also I’m using MYSQL community Edition, you can find rpm’s here : # wget # wget # wget OK, lets start: I configured MySQL’s my.cnf file to use the tuning setup from the my-medium.cnf, which should give us good tuning parameters for our load at this point.

Mysql Master Master Repliction « Nasser Heidari

Then I added the pieces necessary for replication in both DB-1 and DB-2: Moving the MySQL's datadir directory. - lunatechian (lunatech-ia. By default, MySQL's datadir is placed in the /var/lib/mysql directory.

Moving the MySQL's datadir directory. - lunatechian (lunatech-ia

However, if you are planning on using MySQL tables to store a lot of data and your /var partition is small, it might cause you problem at a later stage. In such a scenario, it is better to move the MySQL's datadir to another partition (like /home. The steps are Stop your mysql server before starting this operation Create the directories that will be new datadir chown the directory to the mysql:mysql user copy the files from the old datadir to the new location.

However, make sure that the files named ib_arch_log_0000000000, ib_logfile0 etc. are not copied to the newer location. How to move MySQL datadir to another drive. Your MySQL database takes a huge space and your current drive is almost full? One of the available options is to move MySQL database to another drive with minimal downtime, here is how... On some machines this can also increase MySQL performance, especially one with fast drive -- such as Raptor or SCSI drive. I'm assuming: - the second drive mounted as "/home2" How to change the mysql database location - Spike Developer Zone. Black Duck plans to integrate the SpikeSource products and services into its offerings.

How to change the mysql database location - Spike Developer Zone

The SpikeForge open source projects are being migrated to other forges, and we’re encouraging members of the Developer Zone to join developers on Ohloh.net, Black Duck’s open source project directory and community. As mentioned on the Developer Zone homepage, we will be discontinuing the SpikeSource website and the Developer Zone starting January 9, 2011. If you are looking another Spikeforge project, please contact us at spikesource@blackducksoftware.com. Read the full announcement. MySQL replikacja typu master-master. Top 20+ MySQL Best Practices. Database operations often tend to be the main bottleneck for most web applications today.

Top 20+ MySQL Best Practices

It's not only the DBA's (database administrators) that have to worry about these performance issues. We as programmers need to do our part by structuring tables properly, writing optimized queries and better code. Here are some MySQL optimization techniques for programmers. Most MySQL servers have query caching enabled. It's one of the most effective methods of improving performance, that is quietly handled by the database engine. The main problem is, it is so easy and hidden from the programmer, most of us tend to ignore it. The reason query cache does not work in the first line is the usage of the CURDATE() function. Using the EXPLAIN keyword can give you insight on what MySQL is doing to execute your query. The results of an EXPLAIN query will show you which indexes are being utilized, how the table is being scanned and sorted etc... After adding the index to the group_id field:

My MySQL Binary Log files are taking up all my disk space! – sys.