Error
Static analysis:
1 errors were found during analysis.
Missing expression. (near "ON" at position 25)
SQL query: Edit Edit
SET FOREIGN_KEY_CHECKS = ON;
MySQL said: Documentation
#2006 - MySQL server has gone away
(Korean)
이 에러는 복합적인 문제로 두가지를 동시에 확인해야합니다.
첫번째로 확인해야할 부분은 외래키 사용이 On으로 되어져있기때문에 테이블 작업시 에러가 발생하는 것입니다.
SET foreign_key_checks = 0;
-- run some queries
SET foreign_key_checks = 1;
당연히 Sql 시작 구문에 SET FOREIGN_KEY_CHECKS = OFF; 혹은 숫자 0을 지정하고 마지막 부분에 ON; 또는 숫자 1을 지정하면 해결됩니다.
하지만 다른 문제로 인해서 위의 문구가 발생하는 경우가 있습니다.
바로 max allowed packet 최대 허용 패킷 크기때문입니다.
제 경우에는 운영하는 서버환경설정의 max allowed packet 값이 1000K 으로 지정되어져있었습니다.
이것을 5000K 혹은 그 이상으로 잡아주게되면 쿼리문을 입력할때 문자열이 길어서 제약위반이 되는것을 방지 할 수 있습니다.
vi /etc/my.cnf
max_allowed_packet=5000K
wq! 눌러서 저장하고 나간다음 MySql (MariaDB) 재시작을 하면 됩니다.
service mariadb restart
service mysqld restart
이제 phpmyadmin 에서 확인해보면 max allowed packet 값이 5000K (5,120,000) 들어간것을 확인 할 수 있습니다.
VMWARE VMTOOLs for Windows can download the zip file below.
When you decompress a compressed file, each iso file is present.
You can load the file from vmware workstation 16 to CD-ROM for use.
You can follow the screenshot below for explanation.
Generating a 2048 bit RSA private key
............................................+++
........+++
writing new private key to 'xxxxxxx.co.kr.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:
만약에 이 문장이 나오지 않고 openssl 명령어가 잘못되었다고 나온다면 openssl 인증서를 설치해야합니다.
설치는 yum install openssl -y 아시죠? 설치하면됩니다.
이렇게 입력하고 저는 이때부터 매크로 단축키로 진행합니다.
들어가야 할 항목에 대해서는 제가 알려드릴수 있으나 회사명과 도메인 주소는 각각 자신의 항목에 맞춰서 변경하셔야합니다.
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:KR
string is too long, it needs to be less than 2 bytes long
Country Name (2 letter code) [XX]:KR
State or Province Name (full name) []:Dalseo-gu
Locality Name (eg, city) [Default City]:Daegu
Organization Name (eg, company) [Default Company Ltd]:TION Ltd
Organizational Unit Name (eg, section) []:CEO
Common Name (eg, your name or your server's hostname) []:xxxxxxx.co.kr
Email Address []:emailAdress@tion.kr
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: (공백) 그냥 엔터치면 됩니다.
An optional company name []: (공백) 이곳도 그냥 엔터치면 됩니다.
이렇게 입력하고나면 csr 파일이 하나 만들어집니다.
그 파일을 Vi 명령어로 들어가서 전체 CSR코드를 복사하는 것입니다.
저는 역시 2. VI CSR FILE COPY 버튼을 통해서 서버에서 바로 매크로 완료된 후 CSR코드를 복사할 수 있어 쉽게 붙여넣고 있습니다.