Comment 1 for bug 1680850

Revision history for this message
Jack Ivanov (gunph1ld) wrote :

I found this: CONNECTION_STR_FORMAT = "mysql+pymysql://%s:%s@127.0.0.1:3306"
Why all the parameters are hardcoded? We need to avoid that

You must consider that TCP/127.0.0.1 is not working in mariadb 10 by default due to the unix_socket plugin:
# mysql -e 'SELECT User, Host, plugin FROM mysql.user;'
+------+-----------+-------------+
| User | Host | plugin |
+------+-----------+-------------+
| root | localhost | unix_socket |
+------+-----------+-------------+

# mysql -uroot -hlocalhost -e '\q'
# mysql -uroot -h127.0.0.1 -e '\q'
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

Here is the workaround:
mysql -uroot -hlocalhost -e "UPDATE mysql.user SET plugin='mysql_native_password' WHERE User='root'; FLUSH PRIVILEGES;"