Merge lp:~robert-ayres/charms/precise/mysql/added-readme into lp:charms/mysql

Proposed by Robert Ayres
Status: Merged
Approved by: Juan L. Negron
Approved revision: 92
Merge reported by: Juan L. Negron
Merged at revision: not available
Proposed branch: lp:~robert-ayres/charms/precise/mysql/added-readme
Merge into: lp:charms/mysql
Diff against target: 102 lines (+98/-0)
1 file modified
README.md (+98/-0)
To merge this branch: bzr merge lp:~robert-ayres/charms/precise/mysql/added-readme
Reviewer Review Type Date Requested Status
Juan L. Negron (community) Approve
Review via email: mp+143374@code.launchpad.net

Description of the change

Added README

To post a comment you must log in.
Revision history for this message
Juan L. Negron (negronjl) wrote :

Reviewing this now.

-Juan

Revision history for this message
Juan L. Negron (negronjl) wrote :

Approved ..

Merged.

-Juan

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'README.md'
2--- README.md 1970-01-01 00:00:00 +0000
3+++ README.md 2013-01-15 17:52:20 +0000
4@@ -0,0 +1,98 @@
5+# Overview
6+
7+MySQL is a fast, stable and true multi-user, multi-threaded SQL database server.
8+SQL (Structured Query Language) is the most popular database query language in
9+the world. The main goals of MySQL are speed, robustness and ease of use.
10+
11+Percona is fork of MySQL by Percona Inc. which focuses on maximizing
12+performance, particularly for heavy workloads. It is a drop-in replacement for
13+MySQL and features XtraDB, a drop-in replacement for the InnoDB storage engine.
14+
15+[http://www.mysql.com](http://www.mysql.com)
16+
17+[http://www.percona.com/software/percona-server](http://www.percona.com/software/percona-server)
18+
19+# Usage
20+
21+## General
22+
23+To deploy a MySQL service:
24+
25+ juju deploy mysql
26+
27+Once deployed, you can ssh into the deployed service and access the
28+MySQL console as the MySQL root user:
29+
30+ juju ssh <unit>
31+ mysql -u root -p
32+ # enter root password - /var/lib/juju/mysql.passwd
33+
34+To change deployment to a Percona server:
35+
36+ juju set mysql flavor=percona
37+
38+## Optimization
39+
40+You can tweak various options to optimize your MySQL deployment:
41+
42+* max-connections - Maximum connections allowed to server or '-1' for default.
43+
44+* preferred-storage-engine - A comma separated list of storage engines to
45+ optimize for. First in the list is marked as default storage engine. 'InnoDB'
46+ or 'MyISAM' are acceptable values.
47+
48+* tuning-level - Specify 'safest', 'fast' or 'unsafe' to choose required
49+ transaction safety. This option determines the flush value for innodb commit
50+ and binary logs. Specify 'safest' for full ACID compliance. 'fast' relaxes the
51+ compliance for performance and 'unsafe' will remove most restrictions.
52+
53+* dataset-size - Memory allocation for all caches (InnoDB buffer pool, MyISAM
54+ key, query). Suffix value with 'K', 'M', 'G' or 'T' to indicate unit of
55+ kilobyte, megabyte, gigabyte or terabyte respectively. Suffix value with '%'
56+ to use percentage of machine's total memory.
57+
58+* query-cache-type - Specify 'ON', 'DEMAND' or 'OFF' to turn query cache on,
59+ selectively (dependent on queries) or off.
60+
61+* query-cache-size - Size of query cache (no. of bytes) or '-1' to use 20%
62+ of memory allocation.
63+
64+Each of these can be applied by running:
65+
66+ juju set <service> <option>=<value>
67+
68+e.g.
69+
70+ juju set mysql preferred-storage-engine=InnoDB
71+ juju set mysql dataset-size=50%
72+ juju set mysql query-cache-type=ON
73+ juju set mysql query-cache-size=-1
74+
75+## Replication
76+
77+MySQL supports the ability to replicate databases to slave instances. This
78+allows you, for example, to load balance read queries across multiple slaves or
79+use a slave to perform backups, all whilst not impeding the master's
80+performance.
81+
82+To deploy a slave:
83+
84+ # deploy second service
85+ juju deploy mysql mysql-slave
86+
87+ # add master to slave relation
88+ juju add-relation mysql:master mysql-slave:slave
89+
90+Any changes to the master are reflected on the slave.
91+
92+Any queries that modify the database(s) should be applied to the master only.
93+The slave should be treated strictly as read only.
94+
95+You can add further slaves with:
96+
97+ juju add-unit mysql-slave
98+
99+## Monitoring
100+
101+This charm provides relations that support monitoring via either Nagios or
102+Munin. Refer to the appropriate charm for usage.

Subscribers

People subscribed via source and target branches