On 2/2/19 5:31 AM, Torge Riedel wrote:
A call to
mysql -umailman -p
successfully uses the socket on the machine and logs in.
Yet you haven't specified -S or --socket
I tried
mysql+pymysql://mailman:mailmanpass@127.0.0.1/mailman3?charset=utf8&use_unicode=1&unix_socket=/var/run/mysqld/mysqld.sock
as the connection string but it says that mysql server is not available. Which is the same if remove the "unix_socket" parameter. I have found this parameter when searching the net, but I'm not sure if it is supported.
I think it should be, but the actual connection is via the the sqlalchemy create_engine() function. It appears this should be passed to the pymysql Connection() function per <https://docs.sqlalchemy.org/en/rel_1_2/core/engines.html#custom-dbapi-args>
What happens if in a Python 3 session, you do
from pymysql import connect conn = connect('127.0.0.1', user='mailman', password='mailmanpass', database='mailman3', charset='utf8', use_unicode=1, unix_socket='/var/run/mysqld/mysqld.sock')
As I understand it, that's what sqlalchemy should be doing with your database url. In my testing, the above works with or without the unix_socket= argument, so I suspect something else is wrong in your case.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan