본문 바로가기

DKE

(68)
[Neo4j] MATCH (Basic node finding) / 2023.02.06 https://neo4j.com/docs/cypher-manual/current/clauses/match/ MATCH - Cypher Manual The `MATCH` clause is used to search for the pattern described in it. neo4j.com MATCH 명령어를 사용하면 Neo4j가 데이터베이스에서 검색할 패턴을 지정할 수 있음 *Example Graph CREATE (charlie:Person {name: 'Charlie Sheen'}), (martin:Person {name: 'Martin Sheen'}), (michael:Person {name: 'Michael Douglas'}), (oliver:Person {name: 'Oliver Stone'}),..
[Neo4j] REMOVE / 2023.02.03 https://neo4j.com/docs/cypher-manual/current/clauses/remove/ REMOVE - Cypher Manual The `REMOVE` clause is used to remove properties from nodes and relationships, and to remove labels from nodes. neo4j.com REMOVE 명령어는 속성과 label을 제거하는데에 사용됨 노드 및 관계를 삭제하려면 DELETE 명령어를 사용해야 함 *Example Graph CREATE (peter:Swedish:German {name:'Peter', age:34}), (timothy:Swedish {name:'Timothy', age:25}), (andy:Swedi..
[Neo4j] SET / 2023.02.03 https://neo4j.com/docs/cypher-manual/current/clauses/set/ SET - Cypher Manual The `SET` clause is used to update labels on nodes and properties on nodes and relationships. neo4j.com * Example Graph create (peter {name:'Peter', age:34}), (george {name:'George'}), (andy:Swedish{name:'Andy', age:36, hungry:TRUE}), (stefan {name:'Stefan'}), (george)-[:KNOWS]->(peter), (andy)-[:KNOWS]->(peter), (stef..
[Neo4j] DELETE / 2023.02.03 https://neo4j.com/docs/cypher-manual/current/clauses/delete/ DELETE - Cypher Manual The `DELETE` clause is used to delete nodes, relationships or paths. neo4j.com * Example Graph CREATE (keanu:Person {name: 'Keanu Reever'}), (laurence:Person {name: 'Laurence Fishburne'}), (carrie:Person {name: 'Carrie-Anne Moss'}), (tom:Person {name: 'Tom Hanks'}), (theMatrix:Movie {title: 'The Matrix'}), (keanu..
[Neo4j] CREATE / 2023.02.02 https://neo4j.com/docs/cypher-manual/current/clauses/create/ CREATE - Cypher Manual The `CREATE` clause is used to create nodes and relationships. neo4j.com 1. single node create (n) 2. multiple node create (n), (m) 3. a node with a label create (n:Person) 4. a node with multiple labels create (n:Person:Swedish) 5. create node and add labels and properties create (n:Person {name: 'Andy', title: ..
Kafka와 MySQL 연동하기 (with Python) / 2023.01.31 1. 필요한 라이브러리 설치 - kafka-python :$pip install kafka-python - pymysql :$pip install pymysql 2. Jookeeper, Kafka 실행 - Jookeeper 실행 :$ /tools/zookeeper/bin/zkServer.sh start - Kafka 실행 :$ /tools/kafka/bin/kafka-server-start.sh -daemon /tools/kafka/config/server.properties 3. Producer - Producer는 sql구문을 Topic에 저장하는 역할을 한다 from kafka import KafkaProducer from json import dumps #producer 객체 생성 producer..
[MySQL] 리눅스에 MySQL 설치하기 / 2023.01.27 리눅스 서버에 MySQL을 설치해보자. 1. MySQL 설치 - update :$ sudo apt-get update - MySQL 설치 :$sudo apt-get install mysql-server - MySQL 버전 확인 :$ mysql --version 2. 외부에서 접근가능하도록 포트 개방 - 포트 개방 :$ sudo ufw allow mysql - 빨간 박스 부분 수정 : $ sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf 3. MySQL 실행 - MySQL 실행 :$ service mysql start - MySQL 실행 확인 :$ service mysql status -> active(running)이라고 나오면 실행 완료 4. MySQL 접속 :$ /usr/..
[MySQL] ERROR 1698 (28000): Access denied for user 'root'@'localhost' 해결 방법 / 2023.01.24 외부에서 접속이 불가능 할 때의 해결 방법이다. 먼저, sudo 명령어로 mysql에 접속을 하고 아래 명령어를 따라하면 해결된다. mysql 접속 : $ sudo mysql -u root 1. USE mysql; 2. SELECT User, Host, plugin FROM mysql.user; 3. plugin 변경 : update user set plugin='mysql_native_password' where user='root'; 4. flush privileges; 5. plugin 변경 확인 : select user, host, plugin from user;