Previous Thread
Next Thread
Print Thread
Debian install documentation #37396 27 Jun 24 03:22 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Could we get an update on the Debian MySQL client install documentation, including the apt-get packages used?

TIA


Stephen Funkhouser
Diversified Data Solutions
Re: Debian install documentation [Re: Stephen Funkhouser] #37397 27 Jun 24 03:34 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Good (or maybe bad?) timing on this. A couple of days ago my Debian 12 VM crashed hard (part way through the boot it went to the VMware equivalent of the Blue Screen of Death, with a message saying something like "Oops, something went wrong! Contact your Administrator!"). Since it's just a test system for me, I figured it was a good excuse to recreate it from scratch, which I've mostly done, but today was planning on doing the SQL modules. So I'll take good notes as I go through it and publish them once I'm done (hopefully later today).

Re: Debian install documentation [Re: Stephen Funkhouser] #37398 27 Jun 24 05:57 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Ok, the first and most important step is to get the ASQL connector, which for Debian 12 is here:

libashmysql8.so.1.6.149-d12-x86_64.tz

Note that this one is labeled mysql8 but I believe it is backward compatible to earlier versions of MySQL Server.
And as before, you'll need to unzip it into your bin (or bin64) directory and create a link to the library from /usr/lib/libashmysql.so.1 --
Code
$ cd $MIAME/bin64
sudo ln -s -f $PWD/libashmysql8.so.1.6.149-d12-x86_64 /usr/lib/libashmysql.so.1

That's the A-Shell part of it. For the MySQL part, I suggest starting with a review of this MySQL page: https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/
The fundamental steps would seem to be ...
Code
# update the repository
sudo dpkg -i /tmp/mysql-apt-config_0.8.30-1_all.deb
sudo apt-get update

# install the client relevant package(s) s
sudo apt-get install <package name>

Assuming your database server is already installed somewhere else on the network, I think the only package you'll need is mysql-community-client.
If you're going to install a new server, then you either need mysql-server or mysql-community-server. You can get a list of the available package names via apt-cache search <packagename>

WARNING: I was unable to get the mysql-community-server package to install due to some kind of issue with creation of the mysql user and the /var/lib/mysql directory. It seems possibly related to a discussion I found here (for a much older installation), but I was unable to get the "dirty workaround" to work. So I'm still investigating that.

But it sounds like you only need the client for now, and that installation worked fine for me, using the above 1.6.149 ASQL connector and the -d12 (Debian 12) 7.0.1760.0 release of A-Shell. (Older versions of A-Shell will probably work but I haven't done that much backwards testing.)

Re: Debian install documentation [Re: Stephen Funkhouser] #37399 27 Jun 24 06:16 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Thanks for the quick response.

The default deb repo uses mysql-8.4-lts, so does that default version work with A-Shell?

It also supports mysql-8.0 if you change the mysql.list file


Stephen Funkhouser
Diversified Data Solutions
Re: Debian install documentation [Re: Stephen Funkhouser] #37400 27 Jun 24 09:13 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
I also had to install the libmysqlclient24 package for ldd.

Code
root@vagrant-ddsas-ashell:~# ldd /usr/lib64/libashmysql.so.1
        linux-vdso.so.1 (0x00007ffe43fd3000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f948f141000)
        libmysqlclient.so.24 => /lib/x86_64-linux-gnu/libmysqlclient.so.24 (0x00007f948ea00000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f948f33a000)
        libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x00007f948e956000)
        libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007f948e400000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f948f130000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f948e000000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f948e934000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f948e321000)


Stephen Funkhouser
Diversified Data Solutions
Re: Debian install documentation [Re: Stephen Funkhouser] #37402 28 Jun 24 01:58 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Another note, libashmysql.so.1 has to be created under /usr/lib/ not /usr/lib64/ as it had to be under EL7


Stephen Funkhouser
Diversified Data Solutions
Re: Debian install documentation [Re: Stephen Funkhouser] #37406 28 Jun 24 05:13 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Working backwards...

- /usr/lib vs /usr/lib64 : Since Debian 12 (and Ubuntu 2x) are 64 bit only, it's not clear there's any distinction between these two directories, other than what's in the library search path. There are several ways to adjust the library search path (environment variables and files listed in /etc/ld.so.conf.d being the main two), but at some point there is also a built-in default search path, which typically includes /lib and /usr/lib (and maybe /usr/lib64). On my Debian 12 system, although I'm not sure how that built-in default is established, it clearly includes /usr/lib. But interestingly, the MySQL packages seem to prefer the library directory /usr/lib/x86_64-linux-gnu (added to the search path via /etc/ld.so.conf.d/x86_64-linux-gnu.conf

- It thought that libmysqlclient24 was installed as part of the mysql-community-client package, but it seems as if it can (or should) be installed via as part of the package apt-get install libmysqlclient24

- Yes, I believe A-Shell and the libashmysql8 library work with MySQL 8.4-lts (although I haven't yet succeeded in getting that installed for a real test.)

Re: Debian install documentation [Re: Stephen Funkhouser] #37411 28 Jun 24 06:22 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
I have verified our MySQL code works with libashmysql8 and MySQL 8.4-lts.

I ran a test of changing the release channel to mysql-8.0, but the 8.0 channel contains libmysqlclient21, so no good for linking to the libashmysql8. No one else has to go down that path.

You have to use the mysql-8.4-lts channel to get the libmysqlclient24.


Stephen Funkhouser
Diversified Data Solutions
Re: Debian install documentation [Re: Stephen Funkhouser] #37414 28 Jun 24 07:22 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
I think I can probably generate the libashmysql.so (as opposed to the libashmysql8.so) linked to the older libmysqlclient21 if that would be useful to anyone.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3