Changes between Version 22 and Version 23 of InstallationGuidelines/MySQL
- Timestamp:
- 09/06/10 08:12:25 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InstallationGuidelines/MySQL
v22 v23 1 == Installation on MySQL == 1 [[TOC]] 2 = MySQL = 2 3 Replacing the simple SQLite database with MySQL allows greater scalability 3 4 4 == == Notes ====5 == Notes == 5 6 1. The databases directory contains what web2py knows about your database 6 7 2. You need to set deployment_settings.base.migrate=True in {{{models/000_config.py}}} before you update the code and switch back to deployment_settings.base.migrate=False later on. 7 8 3. In case of database mismatches - check the databases directory for the appropriate .table file and change accordingly. 8 9 9 == = Install MySQL ===10 == Installation == 10 11 {{{ 11 12 apt-get install mysql-server … … 53 54 }}} 54 55 55 == = MySQL optimisation ===56 == Optimisation == 56 57 For Production instances, give the MySQL database plenty of RAM: 57 58 {{{ … … 69 70 ALTER TABLE `pr_person` ADD INDEX ( `first_name` ); 70 71 }}} 71 === MySQL Replication === 72 73 == Troubleshooting == 74 Can view the list of exoesnive queries using: ''tbc'' 75 76 == Replication == 72 77 In order to have a backup instance, configure replication from the Master node to a Backup node: 73 78 * http://www.debiantutorials.net/mysql-database-replication-masterslave/ 74 79 * http://www.howtoforge.com/how-to-repair-mysql-replication 75 80 76 === = On Master: ====81 === On Master: === 77 82 {{{ 78 83 pico /etc/mysql/my.cnf … … 91 96 Read log filename & position for configuring the slave (see below). 92 97 93 === = On Slave: ====98 === On Slave: === 94 99 {{{ 95 100 pico /etc/mysql/my.cnf … … 115 120 }}} 116 121 117 === = IP Failover ====122 === IP Failover === 118 123 Can configure the slave to adopt the same IP as the master using a Heartbeat: 119 124 * http://www.srg.cs.hku.hk/srg/html/cprobe/ha/GettingStarted.html