반응형

superset에서 mysql접속하기 위해서 해야 할 것

 

1. mysqlclient 설치

mac OS에서 가상환경으로 진행하는 경우 해당링크 참조(https://gs-nogada.tistory.com/12)

 

2. SQLAlchemy URI 입력

mysql://아이디:비밀번호@db서버/데이터베이스

해야하는데 주의할 것은 접속할 아이디의 비밀번호가 sha2방식으로 암호화되어있으면 안된다는 것..

pymysql은 참고로 문제 없었음

 

sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError) (2059, "Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/Cellar/mysql-connector-c/6.1.11/lib/plugin/caching_sha2_password.so, 2): image not found") (Background on this error at: http://sqlalche.me/e/e3q8)

 

Error Messages — SQLAlchemy 1.3 Documentation

Parent instance is not bound to a Session; (lazy load/deferred load/refresh/etc.) operation cannot proceed This is likely the most common error message when dealing with the ORM, and it occurs as a result of the nature of a technique the ORM makes wide use

docs.sqlalchemy.org

ALTER USER 'username’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;

https://tableplus.io/blog/2018/07/failed-to-load-caching-sha2-password-authentication-plugin-solved.html

 

3. sqllab에서 sql 날리려고 하니 시원하게 에러 발생

NameError: name '_maybe_box_datetimelike' is not defined

어디서 많이 보던 에러임

/lib/python3.7/site-packages/superset/dataframe.py 수정 시 import부분 말고 함수 파라미터에도 있으므로 수정해준다.

 

잘 된다

반응형

+ Recent posts