Commit 957953bb authored by jake%bugzilla.org's avatar jake%bugzilla.org

Bug 247923 - The docs now specify the difference in syntax for MySQL 3/4…

Bug 247923 - The docs now specify the difference in syntax for MySQL 3/4 regarding the max_allowed_packet option. Patch by Shane H. W. Travis <travis@sedsystems.ca> r=jake
parent 7d40542a
<!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"> --> <!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"> -->
<!-- $Id: installation.xml,v 1.84 2004/12/07 11:52:56 jake%bugzilla.org Exp $ --> <!-- $Id: installation.xml,v 1.85 2004/12/18 11:52:20 jake%bugzilla.org Exp $ -->
<chapter id="installing-bugzilla"> <chapter id="installing-bugzilla">
<title>Installing Bugzilla</title> <title>Installing Bugzilla</title>
...@@ -517,11 +517,13 @@ ...@@ -517,11 +517,13 @@
<title>Configuration</title> <title>Configuration</title>
<warning> <warning>
<para>Poorly-configured MySQL and Bugzilla installations have <para>
Poorly-configured MySQL and Bugzilla installations have
given attackers full access to systems in the past. Please take the given attackers full access to systems in the past. Please take the
security parts of these guidelines seriously, even for Bugzilla security parts of these guidelines seriously, even for Bugzilla
machines hidden away behind your firewall. Be certain to read machines hidden away behind your firewall. Be certain to read
<xref linkend="security"/> for some important security tips.</para> <xref linkend="security"/> for some important security tips.
</para>
</warning> </warning>
<section id="localconfig"> <section id="localconfig">
...@@ -530,16 +532,16 @@ ...@@ -530,16 +532,16 @@
<para> <para>
Once you run <filename>checksetup.pl</filename> with all the correct Once you run <filename>checksetup.pl</filename> with all the correct
modules installed, it displays a message about, and write out a modules installed, it displays a message about, and write out a
file called, file called, <filename>localconfig</filename>. This file contains
<filename>localconfig</filename>. This file contains the default the default settings for a number of Bugzilla parameters.
settings for a number of Bugzilla parameters.
</para> </para>
<para>Load this file in your editor. The only value you <para>
Load this file in your editor. The only value you
<emphasis>need</emphasis> to change is $db_pass, the password for <emphasis>need</emphasis> to change is $db_pass, the password for
the user you will create for your database. the user you will create for your database. Pick a strong
Pick a strong password (for simplicity, it should not contain password (for simplicity, it should not contain single quote
single quote characters) and put it here. characters) and put it here.
</para> </para>
<para> <para>
...@@ -553,8 +555,8 @@ ...@@ -553,8 +555,8 @@
You may also wish to change the names of You may also wish to change the names of
the priorities, severities, operating systems and platforms for your the priorities, severities, operating systems and platforms for your
installation. However, you can always change these after installation installation. However, you can always change these after installation
has finished; if you then re-run has finished; if you then re-run <filename>checksetup.pl</filename>,
<filename>checksetup.pl</filename>, the changes will get picked up. the changes will get picked up.
</para> </para>
</section> </section>
...@@ -562,7 +564,8 @@ ...@@ -562,7 +564,8 @@
<title>MySQL</title> <title>MySQL</title>
<caution> <caution>
<para>MySQL's default configuration is very insecure. <para>
MySQL's default configuration is very insecure.
<xref linkend="security-mysql"/> has some good information for <xref linkend="security-mysql"/> has some good information for
improving your installation's security. improving your installation's security.
</para> </para>
...@@ -571,21 +574,37 @@ ...@@ -571,21 +574,37 @@
<section id="install-setupdatabase"> <section id="install-setupdatabase">
<title>Allow large attachments</title> <title>Allow large attachments</title>
<para>You need to configure MySQL to accept large packets, if you <para>
want to have attachments larger than 64K. Add the text By default, MySQL will only accept packets up to 64Kb in size.
below to your If you want to have attachments larger than this, you will need
<filename>/etc/my.cnf</filename>. to modify your <filename>/etc/my.cnf</filename> as below.
There is also a parameter in Bugzilla
for setting the maximum allowable attachment size, (default 1MB).
Bugzilla will only accept attachments up to the lower of these two
sizes.
</para> </para>
<para>
If you are using MySQL 4.0 or newer, enter:
</para>
<screen> [mysqld]
# Allow packets up to 1M
max_allowed_packet=1M</screen>
<para>
If you are using an older version of MySQL, enter:
</para>
<screen> [mysqld] <screen> [mysqld]
# Allow packets up to 1M # Allow packets up to 1M
set-variable = max_allowed_packet=1M</screen> set-variable = max_allowed_packet=1M</screen>
<para>
There is also a parameter in Bugzilla called 'maxattachmentsize'
(default = 1000 Kb) that controls the maximum allowable attachment
size. Attachments larger than <emphasis>either</emphasis> the
'max_allowed_packet' or 'maxattachmentsize' value will not be
accepted by Bugzilla.
</para>
</section> </section>
<section> <section>
<title>Allow small words in full-text indexes</title> <title>Allow small words in full-text indexes</title>
...@@ -616,47 +635,61 @@ ...@@ -616,47 +635,61 @@
<section> <section>
<title>Permit attachments table to grow beyond 4GB</title> <title>Permit attachments table to grow beyond 4GB</title>
<para>By default, MySQL will limit the size of a table
to 4GB. This limit is present even if the underlying filesystem <para>
By default, MySQL will limit the size of a table to 4GB.
This limit is present even if the underlying filesystem
has no such limit or if you are using RAID. To set a higher has no such limit or if you are using RAID. To set a higher
limit, follow these instructions.</para> limit, follow these instructions.
<para>Run the <filename>MySQL</filename> command-line client and </para>
enter:</para>
<para>
Run the <filename>MySQL</filename> command-line client and
enter:
</para>
<screen> <prompt>mysql&gt;</prompt> ALTER TABLE attachments <screen> <prompt>mysql&gt;</prompt> ALTER TABLE attachments
AVG_ROW_LENGTH=1000000, MAX_ROWS=20000; AVG_ROW_LENGTH=1000000, MAX_ROWS=20000;
</screen> </screen>
<para>The above command will change the limit to 20GB. Mysql will have
<para>
The above command will change the limit to 20GB. Mysql will have
to make a temporary copy of your entire table to do this. Ideally, to make a temporary copy of your entire table to do this. Ideally,
you should do this when your attachments table is still small.</para> you should do this when your attachments table is still small.
</para>
</section> </section>
<section id="install-setupdatabase-adduser"> <section id="install-setupdatabase-adduser">
<title>Add a user to MySQL</title> <title>Add a user to MySQL</title>
<para>You need to add a new MySQL user for <para>
Bugzilla to use. (It's not safe to have Bugzilla use the MySQL root You need to add a new MySQL user for Bugzilla to use.
account.) The following instructions assume the defaults in (It's not safe to have Bugzilla use the MySQL root account.)
<filename>localconfig</filename>; The following instructions assume the defaults in
if you changed those, you need to modify the <filename>localconfig</filename>; if you changed those,
SQL command appropriately. You will need the you need to modify the SQL command appropriately. You will
<replaceable>$db_pass</replaceable> password you set in need the <replaceable>$db_pass</replaceable> password you
<filename>localconfig</filename> in set in <filename>localconfig</filename> in
<xref linkend="localconfig"/>. <xref linkend="localconfig"/>.
</para> </para>
<para>We use an SQL <command>GRANT</command> command to create a <para>
<quote>bugs</quote> We use an SQL <command>GRANT</command> command to create
user. This also restricts the a <quote>bugs</quote> user. This also restricts the
<quote>bugs</quote> <quote>bugs</quote>user to operations within a database
user to operations within a database called called <quote>bugs</quote>, and only allows the account
<quote>bugs</quote>, and only allows the account to connect from to connect from <quote>localhost</quote>. Modify it to
<quote>localhost</quote>. reflect your setup if you will be connecting from another
Modify it to reflect your setup if you will be connecting from machine or as a different user.
another machine or as a different user.</para> </para>
<para>Run the <filename>mysql</filename> command-line client.</para> <para>
<para>If you are using MySQL 4.0 or newer, enter:</para> Run the <filename>mysql</filename> command-line client.
</para>
<para>
If you are using MySQL 4.0 or newer, enter:
</para>
<screen> <prompt>mysql&gt;</prompt> GRANT SELECT, INSERT, <screen> <prompt>mysql&gt;</prompt> GRANT SELECT, INSERT,
UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES,
...@@ -664,11 +697,14 @@ ...@@ -664,11 +697,14 @@
TO bugs@localhost IDENTIFIED BY '<replaceable>$db_pass</replaceable>'; TO bugs@localhost IDENTIFIED BY '<replaceable>$db_pass</replaceable>';
<prompt>mysql&gt;</prompt> FLUSH PRIVILEGES;</screen> <prompt>mysql&gt;</prompt> FLUSH PRIVILEGES;</screen>
<para>If you are using an older version of MySQL, <para>
the <computeroutput>LOCK TABLES</computeroutput> and If you are using an older version of MySQL,the
<computeroutput>LOCK TABLES</computeroutput> and
<computeroutput>CREATE TEMPORARY TABLES</computeroutput> <computeroutput>CREATE TEMPORARY TABLES</computeroutput>
permissions will be unavailable and should be removed from the permissions permissions will be unavailable and should be removed from
list. In this case, the following command line can be used:</para> the permissions list. In this case, the following command
line can be used:
</para>
<screen> <prompt>mysql&gt;</prompt> GRANT SELECT, INSERT, <screen> <prompt>mysql&gt;</prompt> GRANT SELECT, INSERT,
UPDATE, DELETE, INDEX, ALTER, CREATE, DROP, UPDATE, DELETE, INDEX, ALTER, CREATE, DROP,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment