How to solve the problem of max_allowed_packet is read-only when BugZilla is installed on Fedora 11
Problem description:
When I have installed all the perl modules and MySQL databases, the following error occurs when I run./checksetup. pl:
DBD: mysql: db do failed: SESSION variable 'max _ allowed_packet 'is read-only. use set global to assign the value [for Statement "set session max_allowed_packet = 3276750"] at Bugzilla/DB/Mysql. pm line 113
Bugzilla: DB: Mysql: new ('bugzilla: DB: mysql', 'buckets', 'buckets', 'localhost', 'bucket', 0, '') called at Bugzilla/DB. pm line 111
Bugzilla: DB: _ connect ('mysql', 'localhost', 'buckets', 0, '', 'buckets', 'buckets') called at Bugzilla/DB. pm line 96
Bugzilla: DB: connect_main () called at Bugzilla. pm line 317
Bugzilla: dbh ('bucketzilla ') called at./checksetup. pl line 142
Solution:
1. Disable selinux
Since Kernel 2.6, SElinux (Security Enhance linux) Security Enhancement Linux. RHEL 4 has been implemented. Of course, this will happen in Fedora11.
With SElinux, although secure, if it does not meet its policy, it will block many operations. So simply turn it off.
Edit the/etc/selinux/config file
1. vi/etc/selinux/config
2. Change SELINUX = enforcing to SELINUX = disabled.
3.: wq (save and quit)
4. reboot (restart)
2. comment out the modification statement for max_allow_packet.
Max_allow_packet refers to the maximum value of data between the client and the server. The default value is 1 GB.
When I checked the Mysql menu, I had the following sentence:
On the client side, max_allowed_packet has a default of 1 GB... Beginning with MySQL 5.0.3, it also has a read-only
Session scope
That is to say, max_allowed_packet has a default of 1 GB. Since MySQL 5.0.3, http://ubuntuone.cn/is set to read only. The default installation of Fedora 11 is MySQL.
5.1.3. The Bugzilla/DB/Mysql. pm still wants to modify max_allowed_packet = 300 M. This is not acceptable.
[For Statement "set session max_allowed_packet = 3276750"] at Bugzilla/DB/Mysql. pm line 113
So as prompted, I found row 113 of Bugzilla/DB/Mysql. pm line:
$ Self-> do ("set session max_allowed_packet = $ max_allowed_packet ");
And comment out this, that is, add # Before this line #. The format is as follows:
# $ Self-> do ("set session max_allowed_packet = $ max_allowed_packet ");
Iii. Run./checksetup. pl
Success.