1

MySQL Server version:

Ubuntu: 5.7.23-0ubuntu0.18.04.1-log (Ubuntu)

MySQL installed using apt-get.

When installing a plugin with the following command:

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

...I receive the following error message:

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)

What can't Ubuntu locate/find the mysqlx.so library?

John K. N.
  • 18,854
  • 14
  • 56
  • 117
vishnu
  • 21
  • 1
  • 8

2 Answers2

1

Three comments:

One: Maybe you are using 'mysqlx.so; and you forgot the closing " ' "

I mean please use 'mysqlx.so' in stead of 'mysqlx.so

Two: We expect to find the file mysqlx.so in the that /usr/lib/mysql/plugin/.

Is the file mysqlx.so in than path /usr/lib/mysql/plugin/

Three: If so, maybe you have to check if the file mysqlx.so has full permissions for the user that controls mysql.

user88899
  • 21
  • 2
1

Note: By default ubuntu-18.04 apt-get package does not include mysqlx.so plugin file, but macOS mysql-server installation contains mysqlx.so by default.

How to enable mysqlx.so?

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

mysql> SHOW PLUGINS\G

By default, 'mysqlx' will not present in the list. To enable it execute the following (for more info click here),

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

Output:
...
*************************** 45. row ***************************
   Name: mysqlx
 Status: ACTIVE
   Type: DAEMON
Library: mysqlx.so
License: GPL
...

In my case it is not listed in the output. (Now read the initial problem posted my me)

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)

My 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

Output:
...
*************************** 45. row ***************************
   Name: mysqlx
 Status: ACTIVE
   Type: DAEMON
Library: mysqlx.so
License: GPL
...

Additional info: Then installed mysql-shell and python-connector (for my case)

Shell and connector are required for X DevAPI (X Protocol) programming.

vishnu
  • 21
  • 1
  • 8