Connection to rh-mariadb102 with mysql command

Hi all,

NethServer Version: 7.6.810
Module: rh-mariadb102 Collection

I installed mariadb-102 from: https://wiki.nethserver.org/doku.php?id=mariadb102

Reference: http://appdev.oit.umn.edu/2015/02/11/scl/
I created the file: /etc/profile.d/activer-rh-mariadb102.sh

cat > /etc/profile.d/activer-rh-mariadb102.sh <<'EOT'
#!/bin/bash
source /opt/rh/rh-mariadb102/enable
if [[ "$X_SCLS" != *rh-mariadb102* ]]; then
src="`scl enable rh-mariadb102 'echo $X_SCLS'`"
pkgs=(${src// / })
uniq=($(printf "%s\n" "${pkgs[@]}" | sort -u));
export X_SCLS="${uniq[@]}"
fi
EOT


# chmod +x  /etc/profile.d/activer-rh-mariadb102.sh

Restart the VM

# which mysql
/opt/rh/rh-mariadb102/root/usr/bin/mysql

# ls -ls /opt/rh/rh-mariadb102/root/usr/bin/mysql
4044 -rwxr-xr-x 1 root root 4138208 24 oct.   2017 /opt/rh/rh-mariadb102/root/usr/bin/mysql

The path is correct.


# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 14
Server version: 5.5.60-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

MariaDB [(none)]> quit;
Bye
#

This is 5.5.60-MariaDB


# mysql102
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 12
Server version: 10.2.8-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

#

This is 10.2.8-MariaDB

Why it is working correctly on SME-9.2 but not on NethServer-7.6.810?

Thank you,

Michel-André

1 Like

Sorry but I can’t understand what is not working.
I see that both clients are connecting to the server.

What are you expecting?

@michelandre expects that at boot when you use mysql you connect to mariadb102

For what I tested it is basically working on one of my VM but not on his server

I do not understand well why to do this, the server could be broken after using the mariadb102 scl directly, probably the best way could be to use it as an addon like it has been conceived. Moreover the backup system of mysql has been ported to nethserver-rh-mariadb102

1 Like

Quick answer, just tried again in a VM, cp and paste your command then reboot, basically workable, something wrong on your server.

Please test it in a VM.

[root@ns7loc14 ~]# mysql --version
mysql  Ver 15.1 Distrib 10.2.8-MariaDB, for Linux (x86_64) using  EditLine wrapper
1 Like