You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
withpymysql.connect(
host='mariadb.example.com', port=3307,
user='select_only_user', passwd='secret',
db='database1', ssl_ca='ca-cert.pem'
) asconnection:
withconnection.cursor() ascursor:
sql="SHOW STATUS LIKE 'ssl_version%';"cursor.execute(sql)
print(cursor.fetchone())
tried example_ssl.py (adjusted create_pool parameters and cafile) and it fails with:
pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'mariadb.example.com'")
full traceback:
Traceback (most recent call last):
File "C:\Users\Jesse\Documents\aiomysqltest\venv\lib\site-packages\aiomysql\connection.py", line 540, in _connect
await self._request_authentication()
File "C:\Users\Jesse\Documents\aiomysqltest\venv\lib\site-packages\aiomysql\connection.py", line 758, in _request_authentication
self._reader, self._writer = await _open_connection(
File "C:\Users\Jesse\Documents\aiomysqltest\venv\lib\site-packages\aiomysql\connection.py", line 88, in _open_connection
transport, _ = await loop.create_connection(
File "C:\Python39\lib\asyncio\base_events.py", line 1090, in create_connection
transport, protocol = await self._create_connection_transport(
File "C:\Python39\lib\asyncio\base_events.py", line 1120, in _create_connection_transport
await waiter
File "C:\Python39\lib\asyncio\proactor_events.py", line 395, in _loop_writing
self._write_fut = self._loop._proactor.send(self._sock, data)
File "C:\Python39\lib\asyncio\windows_events.py", line 534, in send
self._register_with_iocp(conn)
File "C:\Python39\lib\asyncio\windows_events.py", line 723, in _register_with_iocp
_overlapped.CreateIoCompletionPort(obj.fileno(), self._iocp, 0, 0)
OSError: [WinError 87] Falscher Parameter
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Jesse\Documents\aiomysqltest\test_aiomysql.py", line 43, in <module>
asyncio.get_event_loop().run_until_complete(main())
File "C:\Python39\lib\asyncio\base_events.py", line 647, in run_until_complete
return future.result()
File "C:\Users\Jesse\Documents\aiomysqltest\test_aiomysql.py", line 16, in main
async with aiomysql.create_pool(
File "C:\Users\Jesse\Documents\aiomysqltest\venv\lib\site-packages\aiomysql\utils.py", line 74, in __aenter__
self._obj = await self._coro
File "C:\Users\Jesse\Documents\aiomysqltest\venv\lib\site-packages\aiomysql\pool.py", line 29, in _create_pool
await pool._fill_free_pool(False)
File "C:\Users\Jesse\Documents\aiomysqltest\venv\lib\site-packages\aiomysql\pool.py", line 182, in _fill_free_pool
conn = await connect(echo=self._echo, loop=self._loop,
File "C:\Users\Jesse\Documents\aiomysqltest\venv\lib\site-packages\aiomysql\connection.py", line 75, in _connect
await conn._connect()
File "C:\Users\Jesse\Documents\aiomysqltest\venv\lib\site-packages\aiomysql\connection.py", line 558, in _connect
raise OperationalError(2003,
pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'mariadb.example.com'")
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
the following outputs
('Ssl_version', 'TLSv1.3')
:tried example_ssl.py (adjusted
create_pool
parameters andcafile
) and it fails with:full traceback:
PyMySQL version 1.0.2
aiomysql version 0.1.1
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions