set max_allowed_packet

set max_allowed_packet

am 20.02.2010 18:22:09 von Vikram A

--0-796484839-1266686529=:91788
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi experts, When I try to set the packet size to some other value, it =
is not getting updated.=0Ashow variables; set max_allowed_packet =3D 2=
097152;=0Aset global max_allowed_packet =3D 2097152; it resulting,=0AQ=
uery is ok, 0 rows afected (0.00 sec) Can you suggest me how set this =
value to higher one. By default it is 1 MB. Thank you VIKRAM A=0A=
=0A The INTERNET now has a personality. YOURS! See your Yahoo! H=
omepage. http://in.yahoo.com/
--0-796484839-1266686529=:91788--

Re: set max_allowed_packet

am 20.02.2010 18:46:54 von Paul DuBois

On Feb 20, 2010, at 11:22 AM, Vikram A wrote:

> Hi experts,
>
> When I try to set the packet size to some other value, it is not getting updated.
> show variables;
>
> set max_allowed_packet = 2097152;
> set global max_allowed_packet = 2097152;
>
> it resulting,
> Query is ok, 0 rows afected (0.00 sec)

That's okay. What does this query return:

mysql> select @@global.max_allowed_packet;
+-----------------------------+
| @@global.max_allowed_packet |
+-----------------------------+
| 2097152 |
+-----------------------------+
1 row in set (0.06 sec)

>
> Can you suggest me how set this value to higher one. By default it is 1 MB.
>
> Thank you
>
> VIKRAM A

--
Paul DuBois
Sun Microsystems / MySQL Documentation Team
Madison, Wisconsin, USA
www.mysql.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: set max_allowed_packet

am 21.02.2010 00:58:32 von Jesper Wisborg Krogh

--Apple-Mail-1-640303815
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=WINDOWS-1252;
delsp=yes;
format=flowed


Jesper Wisborg Krogh
Team Leader =95 Certified MySQL 5.0 Developer & DBA
Noggin IT =95 Level 8, 28 Foveaux St, Surry Hills NSW Australia 2010
T: +61 2 9219 8800 =95 F: +61 2 9280 4669 =95 E: jesper@noggin.com.au
http://www.noggin.com.au

On 21/02/2010, at 4:46 AM, Paul DuBois wrote:

>
> On Feb 20, 2010, at 11:22 AM, Vikram A wrote:
>
>> Hi experts,
>>
>> When I try to set the packet size to some other value, it is not =20
>> getting updated.
>> show variables;
>>
>> set max_allowed_packet =3D 2097152;
>> set global max_allowed_packet =3D 2097152;
>>
>> it resulting,
>> Query is ok, 0 rows afected (0.00 sec)
>
> That's okay. What does this query return:
>
> mysql> select @@global.max_allowed_packet;
> +-----------------------------+
> | @@global.max_allowed_packet |
> +-----------------------------+
> | 2097152 |
> +-----------------------------+
> 1 row in set (0.06 sec)

Also remember, when you change a global variable, the change won't =20
effect existing connections, so you will need to log out and back in =20
to see the change. Setting the session variable as well will solve =20
that for the existing connection, but not for other long lived =20
connections:

With mysql1> and mysql2> being two different connections:

mysql1> select @@session.max_allowed_packet, =20
@@global.max_allowed_packet;
+------------------------------+---------------------------- -+
| @@session.max_allowed_packet | @@global.max_allowed_packet |
+------------------------------+---------------------------- -+
| 1048576 | 1048576 |
+------------------------------+---------------------------- -+
1 row in set (0.00 sec)

mysql2> select @@session.max_allowed_packet, =20
@@global.max_allowed_packet;
+------------------------------+---------------------------- -+
| @@session.max_allowed_packet | @@global.max_allowed_packet |
+------------------------------+---------------------------- -+
| 1048576 | 1048576 |
+------------------------------+---------------------------- -+
1 row in set (0.00 sec)

mysql1> set global max_allowed_packet =3D 2097152;
Query OK, 0 rows affected (0.00 sec)

mysql1> select @@session.max_allowed_packet, =20
@@global.max_allowed_packet;
+------------------------------+---------------------------- -+
| @@session.max_allowed_packet | @@global.max_allowed_packet |
+------------------------------+---------------------------- -+
| 1048576 | 2097152 |
+------------------------------+---------------------------- -+
1 row in set (0.00 sec)

mysql2> select @@session.max_allowed_packet, =20
@@global.max_allowed_packet;
+------------------------------+---------------------------- -+
| @@session.max_allowed_packet | @@global.max_allowed_packet |
+------------------------------+---------------------------- -+
| 1048576 | 2097152 |
+------------------------------+---------------------------- -+
1 row in set (0.00 sec)

Jesper

>
>>
>> Can you suggest me how set this value to higher one. By default it =20=

>> is 1 MB.
>>
>> Thank you
>>
>> VIKRAM A
>
> --=20
> Paul DuBois
> Sun Microsystems / MySQL Documentation Team
> Madison, Wisconsin, USA
> www.mysql.com
>
>
> --=20
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?=20
> unsub=3Djesper@noggin.com.au
>


--Apple-Mail-1-640303815--