TEXT 33
Mysql.txt Guest on 22nd April 2021 10:00:22 PM
  1. MySQL
  2. *****
  3.  
  4. You need MySQL version 5.0.15 or higher.
  5.  
  6. It's possible to test which version of MySQL you have installed with:
  7.  
  8. **mysql -V**
  9.  
  10.  
  11. Installing
  12. ==========
  13.  
  14.  
  15. Windows
  16. -------
  17.  
  18. Download the MySQL 32-bit or 64-bit MSI installer from the MySQL
  19. website (~28 MB).
  20.  
  21. MySQL has a standard Windows installer. It's ok to select a Typical
  22. MySQL install (the default). The rest of this documentation assumes
  23. assume you have installed MySQL into "C:\mysql". Adjust paths
  24. appropriately if not.
  25.  
  26.  
  27. Linux/Mac OS X
  28. --------------
  29.  
  30. The package install instructions given previously should have
  31. installed MySQL on your machine, if it didn't come with it already.
  32. Run:
  33.  
  34. **mysql_secure_installation**
  35.  
  36. and follow its advice.
  37.  
  38. If you did install MySQL manually rather than from a package, make
  39. sure the server is started when the machine boots.
  40.  
  41.  
  42. Add a User
  43. ==========
  44.  
  45. You need to add a new MySQL user for Bugzilla to use. Run the "mysql"
  46. command-line client and enter:
  47.  
  48.    GRANT SELECT, INSERT,
  49.    UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES,
  50.    CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.*
  51.    TO bugs@localhost IDENTIFIED BY '$DB_PASS';
  52.  
  53.    FLUSH PRIVILEGES;
  54.  
  55. You need to replace "$DB_PASS" with a strong password you have chosen.
  56. Write that password down somewhere.
  57.  
  58. The above command permits an account called "bugs" to connect from the
  59. local machine, "localhost". Modify the command to reflect your setup
  60. if you will be connecting from another machine or as a different user.
  61.  
  62.  
  63. Change Configuration
  64. ====================
  65.  
  66. To change MySQL's configuration, you need to edit your MySQL
  67. configuration file, which is:
  68.  
  69. * Red Hat/Fedora: "/etc/my.cnf"
  70.  
  71. * Debian/Ubuntu: "/etc/mysql/my.cnf"
  72.  
  73. * Windows: "C:\mysql\bin\my.ini"
  74.  
  75. * Mac OS X: "/etc/my/cnf"
  76.  
  77.  
  78. Allow Large Attachments and Many Comments
  79. -----------------------------------------
  80.  
  81. By default on some systems, MySQL will only allow you to insert things
  82. into the database that are smaller than 1MB.
  83.  
  84. Bugzilla attachments may be larger than this. Also, Bugzilla combines
  85. all comments on a single bug into one field for full-text searching,
  86. and the combination of all comments on a single bug could in some
  87. cases be larger than 1MB.
  88.  
  89. We recommend that you allow at least 16MB packets by adding or
  90. altering the "max_allowed_packet" parameter in your MySQL
  91. configuration in the "[mysqld]" section, so that the number is at
  92. least 16M, like this (note that it's "M", not "MB"):
  93.  
  94.    [mysqld]
  95.    # Allow packets up to 16M
  96.    max_allowed_packet=16M
  97.  
  98.  
  99. Allow Small Words in Full-Text Indexes
  100. --------------------------------------
  101.  
  102. By default, words must be at least four characters in length in order
  103. to be indexed by MySQL's full-text indexes. This causes a lot of
  104. Bugzilla-specific words to be missed, including "cc", "ftp" and "uri".
  105.  
  106. MySQL can be configured to index those words by setting the
  107. "ft_min_word_len" param to the minimum size of the words to index.
  108.  
  109.    [mysqld]
  110.    # Allow small words in full-text indexes
  111.    ft_min_word_len=2
  112.  
  113.  
  114. Permit Attachments Table to Grow Beyond 4GB
  115. ===========================================
  116.  
  117. This is optional configuration for Bugzillas which are expected to
  118. become very large, and needs to be done after Bugzilla is fully
  119. installed.
  120.  
  121. By default, MySQL will limit the size of a table to 4GB. This limit is
  122. present even if the underlying filesystem has no such limit.  To set a
  123. higher limit, run the "mysql" command-line client and enter the
  124. following, replacing "$bugs_db" with your Bugzilla database name
  125. (which is "bugs" by default):
  126.  
  127.    USE $bugs_db;
  128.  
  129.    ALTER TABLE attachments AVG_ROW_LENGTH=1000000, MAX_ROWS=20000;
  130.  
  131. The above command will change the limit to 20GB. MySQL will have to
  132. make a temporary copy of your entire table to do this, so ideally you
  133. should do this when your attachments table is still small.
  134.  
  135. Note: If you have set the setting in Bugzilla which allows large
  136.   attachments to be stored on disk, the above change does not affect
  137.   that.
  138.  
  139. ======================================================================
  140.  
  141. This documentation undoubtedly has bugs; if you find some, please file
  142. them here.

Paste-bin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.