Percona Server with XtraDB

dialog.so cannot be loaded with perl and python clients when plugin-dir is set on [client] section of my.cnf

Reported by Jaime Sicam on 2013-03-16
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server
Status tracked in 5.6
5.1
Undecided
Unassigned
5.5
Medium
Sergei Glushchenko
5.6
Medium
Sergei Glushchenko

Bug Description

Assuming this is set on my.cnf:

[client]
plugin-dir=/usr/lib64/mysql/plugin

On Perl Client, with source code:
use DBI;
 $dbh = DBI->connect('dbi:mysql:mysql;mysql_read_default_file=/etc/my.cnf','ap','123')
 or die "Connection Error: $DBI::errstr\n";
 $sql = "select * from mysql.user";
 $sth = $dbh->prepare($sql);
 $sth->execute
 or die "SQL Error: $DBI::errstr\n";
 while (@row = $sth->fetchrow_array) {
 print "@row\n";
 }

This will error out as:
DBI connect('mysql;mysql_read_default_file=/etc/my.cnf','ap',...) failed: Authentication plugin 'dialog' cannot be loaded: /dialog.so: cannot open shared object file: No such file or directory at mysqltest.pl line 2
Connection Error: Authentication plugin 'dialog' cannot be loaded: /dialog.so: cannot open shared object file: No such file or directory

However, if you copy dialog.so to parent directory(/), it will work.

On Python client, with source code:
import MySQLdb
db = MySQLdb.connect(host="localhost", user="ap", passwd="123", db="mysql",read_default_file="/etc/my.cnf")

This will error out as:
  File "test.py", line 3, in <module>
    db = MySQLdb.connect(host="localhost", user="ap", passwd="123", db="mysql",read_default_file="/etc/my.cnf")
  File "/usr/lib64/python2.6/site-packages/MySQL_python-1.2.4b4-py2.6-linux-x86_64.egg/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/MySQL_python-1.2.4b4-py2.6-linux-x86_64.egg/MySQLdb/connections.py", line 187, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2059, "Authentication plugin 'dialog' cannot be loaded: \xf5\xae\xc43\xef\x7f/dialog.so: cannot open shared object file: No such file or directory")

If installation is based on RPM, say for CentOS 6, you can comment out plugin-dir in my.cnf file and authentication will work.

However, the issue is dialog.so won't be loaded if Percona Server is installed using the binary version and placing it on a custom directory.

Jaime Sicam (jssicam) on 2013-03-16
summary: - dialog.so cannot be loaded when plugin-dir is set in my.cnf [client]
- section and using mysql_read_default_file and read_default_file options
- to load default config respectively
+ dialog.so cannot be loaded with perl and python clients when plugin-dir
+ is set on [client] section of my.cnf

This is not a bug of pam plugin, but likely a bug of client library.

no longer affects: percona-pam-for-mysql
Changed in percona-server:
status: New → Confirmed
Jaime Sicam (jssicam) on 2013-03-16
tags: added: i29131

After plugin-dir is fixed, there still an issue with dialog.so loading. Looks like dialog.so and MySQLdb should be linked with same client library, either libmysqlclient or libmysqlclient_r to be able to be loaded.

Issue seems to be only my setup. On freshly installed system everything work nice. Tested with python and MySQLdb.

tags: added: upstream

Upstream fix in 5.5.32.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.