MySQL 5.7 ERROR 1126 (HY000): Can't open shared library '/usr/lib/mysql/plugin/mysqlx.so

OS: Ubuntu MATE 1.20.1 Release 18.04.2 LTS (Bionic Beaver) 32-bit
Platform: Raspberry Pi 3 B+

I just installed MATE on my RasPi, then installed MySQL Server 5.7, MySql Workbench, and mysql-connector for python3. I'm trying to use mysqlx with the following code:

import mysqlx
from connection_info import conn_args

db = mysqlx.get_session(**conn_args)

where the conn_args is:
conn_args = {
'host': '127.0.0.1',
'port': 3306,
'user': 'data_reader',
'password': 'd@t@!'
}

This code generates a 111 error stating that the connection is refused. However, I can connect using the same credentials using mysql -u data_reader -p as well as from the MySql Workbench connection.

Upon further research, I found that the mysql server is complaining because it doesn't have the mysqlx plugin installed. This was verified by loging into mysql and running SHOW PLUGINS\G which did not list the mysqlx plugin. I then tried to run INSTALL PLUGIN mysqlx SONAME 'mysqlx.so' and received the following error:

ERROR 1126 (HY000): Can't open shared library '/usr/lib/mysql/plugin/mysqlx.so (errno: 2 /usr/lib/mysql/plugin/mysqlx.so: cannot open shared object file: No such file or directory)

I did sudo apt search mysqlx with no results. So, I now have no idea how to solve this issue!

Question: How do I install the mysqlx plugin for MySQL Server 5.7 on MATE 1.20.1???

Thanks!

By default ubuntu-18.04 apt-get package does not include mysqlx.so

Run the following command in mysql> console to know whether mysqlx.so is installed or not:

mysql> INSTALL PLUGIN mysqlx SONAME 'mysqlx.so';

Solution is hard path: Build mysql-server-5.7 from the source (providing all the dependencies)

After the Post installation Setup for mysql-server , execute the following commands in mysql> console:

mysql> INSTALL PLUGIN mysqlx SONAME 'mysqlx.so';
mysql> SHOW PLUGINS\G

Hope this helps

Thanks #LordBoltar. I've seen this info in other forums before and I was just hoping there would be an easier way! I ended up ditching the mysqlx effort and switching to the standard mysql connector. It works well enough for my purposes.