mysql max_allowed_packet 설정
WARNING: The user you typed does not seem to be root
If you encounter any problem with files insertion, try setting the global max_allowed_packet MySQL value to at least 2MB in your server config file.
[root@itms bin]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.69 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show variables where Variable_name = 'max_allowed_packet';
+--------------------+---------+
| Variable_name | Value |
+--------------------+---------+
| max_allowed_packet | 1048576 |
+--------------------+---------+
1 row in set (0.00 sec)
mysql> SET GLOBAL max_allowed_packet = 2048000000;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> show variables where Variable_name = 'max_allowed_packet';
+--------------------+---------+
| Variable_name | Value |
+--------------------+---------+
| max_allowed_packet | 2097152 |
+--------------------+---------+
1 row in set (0.00 sec)
또는
# vi /etc/my.cnf
#추가
set-variable = max_allowed_packet=2M
mysql> show variables where Variable_name = 'max_allowed_packet';
+--------------------+---------+
| Variable_name | Value |
+--------------------+---------+
| max_allowed_packet | 2097152 |
+--------------------+---------+
1 row in set (0.00 sec)
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
7 | mysql table 전체 삭제 | 하서기 | 2020.03.19 | 1507 |
6 | [MySQL] 인덱스 정리 및 팁 | 하서기 | 2017.11.06 | 1637 |
5 | [MySQL] MySQL 테이블 수정 | 하서기 | 2017.09.04 | 1617 |
» | [MySQL] mysql max_allowed_packet 설정 | 하서기 | 2017.08.11 | 1079 |
3 | 사용자 확인, 사용자 추가 | 하서기 | 2016.11.17 | 1945 |
2 | MySQL 덤프(dump) 그리고 복원(Restore) | 하서기 | 2016.11.17 | 1925 |
1 | MySql DB/테이블 사이즈 확인을 위한 쿼리 | 하서기 | 2016.11.17 | 832 |