작성
·
809
0
docker에서는 mysql에 정상적으로 접속이 되는데
python console을 통해서 연결을 시도하면
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2059, "Authentication plugin 'b'auth_gssapi_client'' not configured")
다음 에러가 나옵니다.
select host, user from mysql.user where user= 'root';
쿼리를 통해서 user 정보를 확인해보면 정상적으로 user가 셋팅 되어있습니다.
답변 2
0
추가적으로 에러 전체 로그는
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\PyCharm Professional\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\orm\session.py", line 2414, in scalars
return self._execute_internal(
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\orm\session.py", line 2181, in _execute_internal
conn = self._connection_for_bind(bind)
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\orm\session.py", line 2050, in _connection_for_bind
return trans._connection_for_bind(engine, execution_options)
File "<string>", line 2, in _connection_for_bind
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\orm\state_changes.py", line 139, in _go
ret_value = fn(self, *arg, **kw)
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\orm\session.py", line 1144, in _connection_for_bind
conn = bind.connect()
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\engine\base.py", line 3258, in connect
return self._connection_cls(self)
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\engine\base.py", line 147, in __init__
Connection._handle_dbapi_exception_noconnection(
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\engine\base.py", line 2422, in _handle_dbapi_exception_noconnection
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\engine\base.py", line 145, in __init__
self._dbapi_connection = engine.raw_connection()
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\engine\base.py", line 3282, in raw_connection
return self.pool.connect()
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\pool\base.py", line 449, in connect
return _ConnectionFairy._checkout(self)
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\pool\base.py", line 1263, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\pool\base.py", line 712, in checkout
rec = pool._do_get()
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\pool\impl.py", line 168, in _do_get
with util.safe_reraise():
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\util\langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\pool\impl.py", line 166, in _do_get
return self._create_connection()
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\pool\base.py", line 390, in _create_connection
return _ConnectionRecord(self)
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\pool\base.py", line 674, in __init__
self.__connect()
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\pool\base.py", line 900, in __connect
with util.safe_reraise():
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\util\langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\pool\base.py", line 896, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\engine\create.py", line 643, in connect
return dialect.connect(*cargs, **cparams)
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\sqlalchemy\engine\default.py", line 616, in connect
return self.loaded_dbapi.connect(*cargs, **cparams)
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\pymysql\connections.py", line 358, in __init__
self.connect()
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\pymysql\connections.py", line 664, in connect
self._request_authentication()
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\pymysql\connections.py", line 968, in _request_authentication
auth_packet = self._process_auth(plugin_name, auth_packet)
File "C:\Users\PycharmProjects\pythonProject\pythonProject\.venv\lib\site-packages\pymysql\connections.py", line 1056, in _process_auth
raise err.OperationalError(
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2059, "Authentication plugin 'b'auth_gssapi_client'' not configured")
(Background on this error at: https://sqlalche.me/e/20/e3q8)
이렇습니다.
0
안녕하세요. 아래 명령어를 통해서 명령어를 통해서 비밀번호를 변경해보시겠어요?ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
pymysql을 지운 뒤에 1.0.6 버전으로 다시 인스톨 해보시겠어요?