SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
Revision of Replication from Tue, 12/15/2009 - 14:23
Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.
http://www.howtoforge.com/mysql_database_replication
http://www.onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.html
http://forge.mysql.com/wiki/MySQL_Proxy
http://www.johnandcailin.com/blog/john/scaling-drupal-step-four-database-segmentation-using-mysql-proxy
Configure the Master
Edit my.cnf and so that the MySQL server is listening on the network. You might have to comment out:
#skip-networking
#bind-address = 127.0.0.1Also in my.cnf, specify for which database you want to write logs for, where that log file will be (make sure any directory exists and is writeable by the MySQL user) and specify that this MySQL server is the master.
log-bin = /var/log/mysql/mysql-bin.log
binlog-do-db=exampledb
server-id=1After you've made the changes and saved my.cnf, restart the MySQL server:
svc -t /service/mysqlLog into the MySQL database server as root:
mysql -u admin -pIn the MySQL shell, create a replication user:
GRANT REPLICATION SLAVE ON *.* TO 'slave_user'@'%' IDENTIFIED BY '<some_password>';
FLUSH PRIVILEGES;Now, we'll briefly lock the database tables while we create a backup of the existing database,. We'll also make note of the binary log and the current position in it so the slave will know where to start replicating data from. While still in the MySQL shell:
USE exampledb;
FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;The last command will give output that you will want to make note of, similar to this::
+---------------+----------+--------------+------------------+
| File | Position | Binlog_do_db | Binlog_ignore_db |
+---------------+----------+--------------+------------------+
| mysql-bin.006 | 183 | exampledb | |
+---------------+----------+--------------+------------------+
1 row in set (0.00 sec)There are two ways to get the data from the master server to the slave:
- mysqldump - good for large databases or ones that are currently in use
From the Linux shell, dump the database:mysqldump -u root -p --opt exampledb > exampledb.sql LOAD DATA FROM MASTER- database on the master will be blocked during this operation so might not be good for large, high-traffic live databases.
If using this method, nothing to do right now.
Once the dump is done, unlock the tables and quit out of the MySQL shell:
UNLOCK TABLES;
quit;If doing the mysqldump method, the SQL file can be compressed before copying it to the slave server:
tar -czf exampledb.sql.tar.gz exampledb.sqlCopy the dump to the slave server.
Slave Configuration
On the slave MySQL server, create the database:
mysql -u root -p
CREATE DATABASE exampledb;
quit;
Import the SQL dump from the master (though if you are using the <code>LOAD DATA FROM MASTERmethod, you don't have to do this step):
mysql -u root -p exampledb < /path/to/exampledb.sqlConfigure MySQL on the server so that it knows that it is a slave to the master server and which master database you want it to watch. Add/edit the following lines in my.cnf
server-id=2
master-host=<master ip>
master-user=slave_user
master-password=secret
master-connect-retry=60
replicate-do-db=exampledbRestart MySQL:
svc -t /service/mysqlIf you haven't imported the database from an SQL dump, now is the time to LOAD DATA FROm MASTER:
mysql -u root -p
LOAD DATA FROM MASTER;
quit;- Log in to post comments