Mariadb103 available

yum install nethserver-rh-mariadb103 --enablerepo=stephdl

https://wiki.nethserver.org/doku.php?id=mariadb103

3 Likes

Hi Stéphane,

I appreciate.

If I am already using RH-MariaDB-102, is it possible to update to this one?

Michel-André

I suppose yes if you backup your database and drop it to the new mariadb, in fact it is a new software collection, no upgrade path.

https://www.softwarecollections.org/en/scls/?search=mariadb

1 Like

Hi Stéphane,

I installed Mariadb103.

Installing, it tooks a long time for:

  VĂ©rification : 3:rh-mariadb103-mariadb-server-10.3.13-4.el7.x86_64                    8/8

If I try to start it:

# mysql103
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/rh-mariadb103/mariadb.sock' (2)
#


# systemctl list-unit-files | grep mariadb
mariadb.service                               disabled
rh-mariadb103-mariadb.service                 enabled
rh-mariadb103-mariadb@.service                disabled
#

# /opt/rh/rh-mariadb103/root/usr/bin/mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 4
Server version: 5.5.60-MariaDB MariaDB Server

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

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

MariaDB [(none)]>

In /var/log/rh-mariadb103/mariadb.log, I have ther following error:



2020-04-15 11:42:04 0 [Note] InnoDB: 10.3.13 started; log sequence number 0; transaction id 7
2020-04-15 11:42:04 0 [Note] Plugin ‘FEEDBACK’ is disabled.
ERROR: 1049 Unknown database ‘mysql’
2020-04-15 11:42:04 0 [ERROR] Aborting

Also, I cannot acces anymore the NethServer Web interface at port 980.

Michel-André

not related

but indeed it takes a LONG time 


valid issue :slight_smile:

ERROR: 1049 Unknown database 'mysql'

NethGui is up without issue

Sorry I pushed the bad rpm :expressionless:

The new rpm is up and it is workable I am really sorry for this @michelandre

to remove the bad rpm

yum remove *\rh-mariadb103\* -y
rm -rf /var/opt/rh/rh-mariadb103/
config delete rh-mariadb103-mariadb
yum clean all --enablerepo=*
yum install nethserver-rh-mariadb103 --enablerepo=stephdl
2 Likes

Hi again Stéphane,

I used the same VM snapshot as before.

VĂ©rification : 3:rh-mariadb103-mariadb-server-10.3.13-4.el7.x86_64                    9/9

The first one is 8/8 and the second one is 9/9.
I do not remember if I did a yum update with the first one. The second one I didn’t do a yum update

Now I am able to connect to the NethServer interface.

But, I still have the error:

# mysql103
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/rh-mariadb103/mariadb.sock' (2)
#

This below, looks like the standard mariadb

# ps aux | grep maria
mysql     1653  0.2  2.3 980800 91968 ?        Sl   13:04   0:02 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock
root      5663  0.0  0.0 112732   976 pts/0    S+   13:25   0:00 grep --color=auto maria
#

This is the status of - MariaDB 10.3:

# systemctl status mysql.service
● rh-mariadb103-mariadb.service - MariaDB 10.3 database server
   Loaded: loaded (/usr/lib/systemd/system/rh-mariadb103-mariadb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since mer. 2020-04-15 13:16:54 EDT; 25min ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 1420
   CGroup: /system.slice/mysqld.service
           ├─1420 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
           └─1653 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock

avril 15 13:16:54 tchana.micronator-dev.org systemd[1]: Starting MariaDB 10.3 database server...
avril 15 13:16:54 tchana.micronator-dev.org systemd[1]: rh-mariadb103-mariadb.service: control process exited, code=exited status=1
avril 15 13:16:54 tchana.micronator-dev.org systemd[1]: Failed to start MariaDB 10.3 database server.
avril 15 13:16:54 tchana.micronator-dev.org systemd[1]: Unit rh-mariadb103-mariadb.service entered failed state.
avril 15 13:16:54 tchana.micronator-dev.org systemd[1]: rh-mariadb103-mariadb.service failed.
#

In journalctl -xe

Database MariaDB is not initialized, but the directory /var/opt/rh/rh-mariadb103/lib/mysql is not empty,

Just for a test, I deleted some files:

# rm -rf /var/opt/rh/rh-mariadb103/lib/mysql/*

I started Mariadb 10.3

# systemctl restart rh-mariadb103-mariadb.service
#

Now Mariadb 10.3 started.

# systemctl status  rh-mariadb103-mariadb.service  |  grep Active
   Active: active (running) since mer. 2020-04-15 13:55:52 EDT; 2min 55s ago
#

But I can not access it.

# mysql103
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
# 

Michel-André

Sorry for my previous reply, I guess I wrote it at the same time as yours


I will try what you wrote


Michel-André

1 Like

wonderful
sorry for the noise

I took the original VM Snapshot.

# yum clean all --enablerepo=*


# yum install nethserver-rh-mariadb103 --enablerepo=stephdl


# systemctl -l status mysqld.service
● rh-mariadb103-mariadb.service - MariaDB 10.3 database server
   Loaded: loaded (/usr/lib/systemd/system/rh-mariadb103-mariadb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since mer. 2020-04-15 14:24:56 EDT; 5min ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 1436
   CGroup: /system.slice/mysqld.service
           ├─1436 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
           └─1616 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock

avril 15 14:24:56 tchana.micronator-dev.org systemd[1]: Starting MariaDB 10.3 database server...
avril 15 14:24:56 tchana.micronator-dev.org systemd[1]: rh-mariadb103-mariadb.service: control process exited, code=exited status=1
avril 15 14:24:56 tchana.micronator-dev.org systemd[1]: Failed to start MariaDB 10.3 database server.
avril 15 14:24:56 tchana.micronator-dev.org systemd[1]: Unit rh-mariadb103-mariadb.service entered failed state.
avril 15 14:24:56 tchana.micronator-dev.org systemd[1]: rh-mariadb103-mariadb.service failed.
#

Where did I go wrong?

I will use a snapshot from another VM.

Michel-André

if the VM is not important drop it to the bin, else

yum remove *\rh-mariadb103\* -y
rm -rf /var/opt/rh/rh-mariadb103/
config delete rh-mariadb103-mariadb
yum clean all --enablerepo=*
yum install nethserver-rh-mariadb103 --enablerepo=stephdl
1 Like

I took my fully fonctional Discourse VM.

371  2020-04-15 14:39:19 scl -l
372  2020-04-15 14:39:33 ls -als /opt/
373  2020-04-15 14:39:52 yum repolist
374  2020-04-15 14:40:31 yum install http://mirror.de-labrusse.fr/NethServer/7/x86_64/nethserver-stephdl-1.0.9-1.ns7.sdl.noarch.rpm
375  2020-04-15 14:41:58 yum install nethserver-rh-mariadb103 --enablerepo=stephdl
376  2020-04-15 14:53:36 date
377  2020-04-15 14:54:47 systemctl status mysql

                         SAME ERROR

378  2020-04-15 14:55:25 yum remove *\rh-mariadb103\* -y
379  2020-04-15 14:59:34 rm -rf /var/opt/rh/rh-mariadb103/
380  2020-04-15 14:59:45 config delete rh-mariadb103-mariadb
381  2020-04-15 14:59:54 yum clean all --enablerepo=*

382  2020-04-15 15:00:09 date
383  2020-04-15 15:00:14 yum install nethserver-rh-mariadb103 --enablerepo=stephdl -y
384  2020-04-15 15:01:56 date
385  2020-04-15 15:02:25 systemctl status mysql
386  2020-04-15 15:02:40 mysql103

                         FONCTIONAL

The difference between 8/8 and 9/9 is: scl-utils-20130529-19.el7.x86_64

The first installation above took 10 minutes waiting for the

 VĂ©rification : 3:rh-mariadb103-mariadb-server-10.3.13-4.el7.x86_64                    8/8

The second installation took 1:47 minutes for the complete installation.

At least it’s working now, but there is something “fishy” somwhere


I will retry on the original VM that was not working before and let you know. Maybe the cleanup is doing something


Michel-André

not sure to understand fully but the mistake was on my side, I did release a rpm not workable, the version 0.0.2 is workable, the 0.0.1 is broken

don’t loose time on it :expressionless:

OK, but how do you explain I had to install twice on the Discourse VM which I did after your update ?

Maybe it was the repo which was not updated on the first installation on the Discourse machine.

Michel-André

sorry I did not catch you ?

I did the first installation on the Discourse VM maybe 20 minutes from now and the second one after.

It was a long time after you update.

Michel-André

Sorry but in short

do you have an issue, if yes what is the issue :slight_smile:

if all is workable
I am fine 
 if I have broken something I am bad :frowning:

No, you’re OK.

The problem is from my side and I think it is the repo that was not updated before I installed.

I recovered the original VM with the error and I will clean as you wrote above then try the installation again. If it works, it means it was the cleaning of the repo.

Michel-André

1 Like