'Web_Program/MySQL'에 해당되는 글 3건

  1. 2019.07.31 mysql root 패스워드 없이 접속될때 1
  2. 2019.05.10 외래키 제약조건 무시하기
  3. 2018.11.05 오류처리 Exception 'yii\db\Exception' with message 'Error while sending QUERY packet.

mysql root 패스워드 없이 접속될때

|

mysql user테이블에 root유저 필드를 보면 plugin이 있다 unix_socket로 되어있으면 패스워드없이 들어가진다

 

UPDATE mysql.user SET plugin = '' WHERE user = 'root' AND host = 'localhost';

FLUSH PRIVILEGES;

위와같이 없애면 잘 된다

And

외래키 제약조건 무시하기

|

외래키 무시

SET foreign_key_checks = 0;

 

작업 후

 

SET foreign_key_checks = 1;

 

돌려놓기

And

오류처리 Exception 'yii\db\Exception' with message 'Error while sending QUERY packet.

|

  1 [mysqld]

  2 max_allowed_packet=524288000

  3

  4 skip-external-locking

  5 key_buffer_size = 512M

  6 max_allowed_packet = 16M

  7 table_open_cache = 512

  8 sort_buffer_size = 2M

  9 read_buffer_size = 2M

 10 read_rnd_buffer_size = 8M

 11 myisam_sort_buffer_size = 64M

 12 thread_cache_size = 8

 13 query_cache_size = 64M

 14 thread_concurrency = 8

 15 server-id = 1162

 16 binlog_format=mixed

 17 expire_logs_days = 5

 18 user = mysql

 19 skip_name_resolve

 20 log-warnings = 2

 21 slow_query_log

 22 long_query_time = 1

 23 open_files_limit = 2048

 24 skip_slave_start

 25 slave-skip-errors = all

 26 max_heap_table_size = 1G

 27 wait_timeout = 28800



max_allowed_packet=524288000

wait_timeout = 28800


2가지 옵션을 줘본다.


And
prev | 1 | next