PxPlus User Forum

Twitter Twitter Twitter

Author Topic: MySQL on Linux  (Read 335 times)

Stéphane Devouard

  • Gold Member
  • ****
  • Posts: 55
  • Once PxPlus guru, reskilled in C#, Java, PHP, JS
    • View Profile
    • Stéphane's Web Resume
MySQL on Linux
« on: December 01, 2020, 06:29:13 AM »
Hi all

On Windows, I have to put the libmysql.dll library file in the PxPlus folder to be able to use the [mysql] tag to access a MySQL database

On Linux, I did a copy of libmysqlclient.so in the pxplus directory, but I keep on getting an error 15 when opening a channel to MySQL
I did a chown, chgrp to my user & group and a chmod 777 on the file to make sure it wasn't a permissions issue, did not work either
Also tried adding the PxPlus directory to the PATH variable and exported it before starting pxplus, no more success

Code: [Select]
PxPlus-2020 Web (Ver:17.10/UNIX-Linux-Ubuntu) Serno:1710-664-2130620
(c) Copyright 2005-2020 PVX Plus Technologies Ltd. (All rights reserved)
  Website: http://www.pvxplus.com
->? env("PATH")
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/steph/heron/pxplus
->
->open(1)"[mysql]compass_demo;;server=localhost;user=admin;password=password"
Error #15: Operating system command failed
Unable to load libmysqlclient.so (err/ret=2/2)
->

total 43144
-rw-------  1 steph steph   223687 avril 24  2020 ca-bundle.crt
drwxrwxr-x 36 steph steph    12288 nov.  30 10:25 lib
-rw-r--r--  1 steph steph  3167132 sept. 23 01:29 libhpls.a
-rwxr-xr-x  1 steph steph  1914200 sept. 23 01:29 libhpls.so
-rwxr-xr-x  1 steph steph   336072 déc.   1 11:59 libmysqlclient.so
-rwxr-xr-x  1 steph steph  2908920 sept. 23 01:33 libpvx.so
-rw-rw-rw-  1 steph steph       44 nov.  30 10:25 lic_approval.txt
-rw-r--r--  1 steph steph    12865 sept. 23 01:33 licenses_3rdparty.txt
-rw-r--r--  1 steph steph    10074 sept. 23 01:33 license.txt
-rw-r--r--  1 steph steph     1347 sept. 23 01:33 magic
-rwxr-xr-x  1 steph steph   670184 sept. 23 01:31 PxIO.so
-rw-rw-r--  1 steph steph 31469184 nov.  30 10:18 pxp1710-0000-U20-64.taz
-rw-r--r--  1 steph steph       11 sept. 23 01:33 pxp_build
-rwxr-xr-x  1 steph steph  2558632 sept. 23 01:32 pxplus
-rwxr-xr-x  1 steph steph    36672 sept. 23 01:33 pxpreg
-rwxr-xr-x  1 steph steph   804456 sept. 23 01:31 pxserver
-rw-------  1 steph steph     1404 sept. 23 01:31 pxserver.conf
-rwxr-xr-x  1 steph steph      461 sept. 23 01:33 runconfig
-rwxr-xr-x  1 steph steph      584 sept. 23 01:33 runserver
-rwxr-xr-x  1 steph steph     1154 sept. 23 01:33 stopserver


What else am I missing ?

TIA
Stéphane Devouard
Portfolio | Company

Gilles

  • Silver Member
  • ***
  • Posts: 21
    • View Profile
Re: MySQL on Linux
« Reply #1 on: December 01, 2020, 08:37:38 AM »
I Stephane

I'm surprised by the size of your libmysqlclient.so file.
What version of Linux?

Can you do:

$sudo updatedb
$ sudo locate libmysqlclient.so
$ sudo file /home/steph/heron/pxplus/libmysqlclient.so

Devon Austen

  • Staff
  • Diamond Member
  • *****
  • Posts: 270
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: MySQL on Linux
« Reply #2 on: December 01, 2020, 08:39:39 AM »
Is the mysql on Linux 32-bit or 64-bit? What is the PxPlus 32-bit or 64-bit. They must match. A 32-bit pxplus can't load a 64-bit mysql .so etc.

Also try installing the mysql in the standard linux library directory /usr/lib or /usr/lib64.
Software Developer for PVX Plus Technologies LTD.

Stéphane Devouard

  • Gold Member
  • ****
  • Posts: 55
  • Once PxPlus guru, reskilled in C#, Java, PHP, JS
    • View Profile
    • Stéphane's Web Resume
Re: MySQL on Linux
« Reply #3 on: December 01, 2020, 10:23:24 AM »
Hi Gilles

What version of Linux?

It's an Ubuntu 20.04 64 bits VM

I have "installed" MySQL with the XAMPP package (an Apache/MySQL/PHP/Perl bundle that exists for Windows & Linux)

updatedb & locate are unknown commands

sudo file /home/steph/heron/pxplus/libmysqlclient.so
/home/steph/heron/pxplus/libmysqlclient.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=8e7f8b98175ee0b31922bee8267d56b7b6424fd6, stripped


Is the mysql on Linux 32-bit or 64-bit? What is the PxPlus 32-bit or 64-bit. They must match. A 32-bit pxplus can't load a 64-bit mysql .so etc.

Also try installing the mysql in the standard linux library directory /usr/lib or /usr/lib64.

Devon,

The shared object is 64 bits (see above) and PxPlus is 64 bits as well :
steph@steph-ubuntu:~/heron/pxplus$ file pxplus
pxplus: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=ca5da2920f359474e552d5c711478435cdef1990, for GNU/Linux 3.2.0, with debug_info, not stripped


Any other idea ?
Stéphane Devouard
Portfolio | Company

Devon Austen

  • Staff
  • Diamond Member
  • *****
  • Posts: 270
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: MySQL on Linux
« Reply #4 on: December 01, 2020, 10:36:51 AM »
You should not need the .so file copied to the pxplus directory. When mysql is installed on linux it should place it in a system shared library directory where pxplus can load it. If the mysql library has any dependencies it is important it is left there so it can find them.

you can also ldd libmysqlclient.so to see the dependencies and make sure they are present.
Software Developer for PVX Plus Technologies LTD.

Stéphane Devouard

  • Gold Member
  • ****
  • Posts: 55
  • Once PxPlus guru, reskilled in C#, Java, PHP, JS
    • View Profile
    • Stéphane's Web Resume
Re: MySQL on Linux
« Reply #5 on: December 01, 2020, 11:21:05 AM »
Tried a

Code: [Select]
sudo apt install mysql-server
... and the bloody thing terminated with an error code because it depends on mysql-server-8.0 (?!?) which is not configured

Apparently it did not install everything it is supposed to install in the shared libraries directory because PxPlus still returns an error 15

Guess I won't flood this thread with off-topic messages
If anyone of you guys has a link to a procedure describing the setup of MySQL on Linux, it will be welcome

Otherwise I'll work with the PxPlus MySQL interface on Windows where it works as expected, and where I can also run MySQL Workbench and connect to my local instance instead of getting an AppArmor cryptic error message.

TIA
Stéphane Devouard
Portfolio | Company