| 1 | == Installation on MySQL == |
| 2 | Replacing the simple SQLite database with MySQL allows greater scalability |
| 3 | |
| 4 | Create the database 1st: |
| 5 | {{{ |
| 6 | mysqladmin --user=root -p create sahana |
| 7 | mysql -p |
| 8 | GRANT USAGE ON mysql.sahana TO 'sahana'@'localhost' IDENTIFIED BY 'mypassword'; |
| 9 | }}} |
| 10 | |
| 11 | Suggest to use connection pools to reuse connections in {{{models/00_db.py}}}: |
| 12 | {{{ |
| 13 | db=SQLDB('mysql://user:password@hostname/sahana',pools=20) |
| 14 | }}} |
| 15 | |
| 16 | How many pools? |
| 17 | {{{ |
| 18 | whatever you choose it always starts with one and grows with the |
| 19 | number of concurrent requests up to the value of pools (the max number |
| 20 | of concurrent pools). So pools should be the max number of concurrent |
| 21 | requests you expect. That is the max value of: |
| 22 | <number of requests/second> / <average time per request in seconcds> |
| 23 | }}} |
| 24 | |
| 25 | ---- |
| 26 | InstallationGuidelines |