Difference between revisions of "Mariadb105"

From SME Server
Jump to navigationJump to search
 
(8 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
<!-- we define the language -->
 
<!-- we define the language -->
 
{{#vardefine:lang| {{lc:  {{#titleparts:    {{PAGENAME}} | | -1}}  }} |en }}
 
{{#vardefine:lang| {{lc:  {{#titleparts:    {{PAGENAME}} | | -1}}  }} |en }}
 +
 +
{{Warning box|1= You will need to update core package e-smith-mysql to use this contrib to smeserver-mysql >= 2.7.0-5, currently available in smeupdates-testing }}
 +
{{Note box| Mariadb 10.5 support is up to 24 June 2025 so one year more than SME10 which EOL is  30 June 2024. }}
 +
 
{{Infobox contribs
 
{{Infobox contribs
 
|name={{#var:contribname}}
 
|name={{#var:contribname}}
Line 27: Line 31:
 
=== Description ===
 
=== Description ===
 
Koozali SME Server configuration package for mariadb105 RH SCLo
 
Koozali SME Server configuration package for mariadb105 RH SCLo
 +
This RPM will allow you to have 2 or more (if also using another contrib for another sclo version) versions of MySQL running side by side. You will have to select the one to use in the setup of the specific application - please see "usage" below. Please note that applications and contribs like phpmyadmin etc. will as standard use the original Mysql DBM for your OS unless you change the database connection.
 +
 +
Most of configuration options are explained for mysql/mariadb here : [[MySQL]] are also available for mariadb105 ( except innoDB options).
 +
Only difference is to prefix mariadb and mysql.init db entry by "mariadb105-". ie: mariadb105-mariadb and mariadb105-mysql.init
  
 +
Note that on SME all mariadb service will share the same /etc/my.cnf configuration file. Generik part are read by all servers (eg: [mysqld] or [mariadb]), while specific version will only be read by the same version server (eg: [mariadb-10.1] for mariadb101). Also multiple for occurrence of one option where a server is able to read , the last one is used.
 +
 +
Note that default behaviour will be socket only, and if you enable networking, it will listen on default port on localhost.  You then will need to open port to access remotely on LAN (private) or on web (public). Be careful that you need to manually configure yourself TLS encryption for mariadb before doing this kind of access as this is not part of base configuraiton and will leave your mysql traffic visible non encrypted.
 +
 +
Also if you want another port you need to define port to whatever you want. Also remember that default 3306 mysql port is reserved to original mariadb server
  
 
=== Installation ===
 
=== Installation ===
 
<tabs container><tab name="For SME 10">
 
<tabs container><tab name="For SME 10">
 +
yum install smeserver-extrarepositories-centos-sclo
 
  yum --enablerepo=smecontribs install {{#var:smecontribname}}
 
  yum --enablerepo=smecontribs install {{#var:smecontribname}}
</tab><tab name="For SME 9">
+
 
yum --enablerepo=smecontribs install {{#var:smecontribname}}
+
then try [[PHPMyAdmin]] for better experience
signal-event post-upgrade
+
</tab>
signal-event reboot
+
</tabs>
</tab><tab name="For SME 8">
 
yum --enablerepo=smecontribs install {{#var:smecontribname}}
 
signal-event post-upgrade
 
signal-event reboot
 
</tab></tabs>
 
  
 
=== Configuration ===
 
=== Configuration ===
 
you can list the available configuration with the following command :
 
you can list the available configuration with the following command :
  config show {{#var:contribname}}
+
  config show {{#var:contribname}}-mariadb
 +
config show {{#var:contribname}}-mysql.init
  
 
Some of the properties are not shown, but are defaulted in a template or a script. Here a more comprehensive list with default and expected values :
 
Some of the properties are not shown, but are defaulted in a template or a script. Here a more comprehensive list with default and expected values :
 
{| class="wikitable"
 
{| class="wikitable"
!property
+
!property {{#var:contribname}}-mariadb
 
!default
 
!default
 
!values
 
!values
 
!
 
!
 
|-
 
|-
|DbName
+
|LocalNetworkingOnly
|nextcloud
+
|yes
|string
+
|yes,no
|for mysql db
+
|default provides only socket acces
 
|-
 
|-
|DbPassword
+
|TCPPort
|GENERATED
+
|
|string
+
|port empty
|for mysql db
+
|keep empty for security prupose
 
|-
 
|-
|DbUser
+
|port
|nextcloud
+
|
|string
+
|port number
|for mysql db
+
|default 3313 if empty
 
|-
 
|-
 
|access
 
|access
|private
 
|private, public
 
 
|
 
|
 +
|private, public,<nowiki>''</nowiki>
 +
|default empty for only localhost access
 +
|-
 +
|status
 +
|enabled
 +
|enabled,disabled
 +
|
 +
|}
 +
{| class="wikitable"
 +
!property {{#var:contribname}}-mysql.init
 +
!default
 +
!values
 +
!
 
|-
 
|-
 
|status
 
|status
 
|enabled
 
|enabled
 
|enabled,disabled
 
|enabled,disabled
 +
|
 
|}
 
|}
  
 +
===Usage===
 +
 +
you can access using command line with the following commands, a few similar ones. in doubt you can use the --socket=/var/lib/mysql/mariadb105.sock after the mysql command you want.
 +
mysql105
 +
msqlshow105
 +
mysqladmin105
 +
mysqldump105
 +
mysqlimport105
 +
mysqlbinlog105
 +
Alternatively:
 +
 +
The complete path to the specific version of mysql57 server with the mysql client would be:
 +
/opt/rh/rh-mariadb105/root/usr/bin/mysql  --socket=/var/lib/mysql/mariadb105.sock
 +
or
 +
mysql --socket=/var/lib/mysql/mariadb105.sock
 +
 +
 +
For Wordpress adjust the DB_HOST value in the wp-config.php file accordingly.
 +
 +
  define( 'DB_HOST', 'localhost:/var/lib/mysql/mariadb105.sock' );
 +
or
 +
 +
  define( 'DB_HOST', '127.0.0.1:/var/lib/mysql/mariadb105.sock' );
 +
 +
some other php app migh need something like
 +
  localhost;unix_socket=/var/lib/mysql/mariadb105.sock
  
 +
=== Resetting the MySQL root password ===
 +
To reset the password for the MySQL root account. The MySQL root user on SME Server has a random generated password which is generated during installation. You do not need to know this password to login to MySQL with root privileges on SME Server. If you might have changed the MySQL root password you can reset it like this after getting command line access as root user.
 +
Any restart of the server will do the job
 +
systemctl restart {{#var:contribname}}-mariadb.service
  
 
=== Uninstall ===
 
=== Uninstall ===
  yum remove {{#var:smecontribname}}  {{#var:contribname}}
+
  yum remove {{#var:smecontribname}}  rh-{{#var:contribname}}*
  
 
=== Bugs ===
 
=== Bugs ===
Line 100: Line 152:
 
<!-- Please keep there the template revision  number as is -->
 
<!-- Please keep there the template revision  number as is -->
 
[[contribtemplate::2| ]]
 
[[contribtemplate::2| ]]
[[contriblang:: {{#var:lang}} | ]]
 

Latest revision as of 21:17, 19 March 2022




Warning.png Warning:
You will need to update core package e-smith-mysql to use this contrib to smeserver-mysql >= 2.7.0-5, currently available in smeupdates-testing


Important.png Note:
Mariadb 10.5 support is up to 24 June 2025 so one year more than SME10 which EOL is 30 June 2024.



mariadb105
Mariadb-logo-vert blue-transparent.png
mariadb105 logo
Maintainerunnilennium
Urlhttps://mariadb.com
Category

database

Tags mariadbmysqldbdatabase


Maintainer

Jean-Philippe Pialasse

Version

Alpha 10:
Contrib 10:
smeserver-mariadb105
The latest version of smeserver-mariadb105 is available in the SME repository, click on the version number(s) for more information.


Description

Koozali SME Server configuration package for mariadb105 RH SCLo This RPM will allow you to have 2 or more (if also using another contrib for another sclo version) versions of MySQL running side by side. You will have to select the one to use in the setup of the specific application - please see "usage" below. Please note that applications and contribs like phpmyadmin etc. will as standard use the original Mysql DBM for your OS unless you change the database connection.

Most of configuration options are explained for mysql/mariadb here : MySQL are also available for mariadb105 ( except innoDB options). Only difference is to prefix mariadb and mysql.init db entry by "mariadb105-". ie: mariadb105-mariadb and mariadb105-mysql.init

Note that on SME all mariadb service will share the same /etc/my.cnf configuration file. Generik part are read by all servers (eg: [mysqld] or [mariadb]), while specific version will only be read by the same version server (eg: [mariadb-10.1] for mariadb101). Also multiple for occurrence of one option where a server is able to read , the last one is used.

Note that default behaviour will be socket only, and if you enable networking, it will listen on default port on localhost. You then will need to open port to access remotely on LAN (private) or on web (public). Be careful that you need to manually configure yourself TLS encryption for mariadb before doing this kind of access as this is not part of base configuraiton and will leave your mysql traffic visible non encrypted.

Also if you want another port you need to define port to whatever you want. Also remember that default 3306 mysql port is reserved to original mariadb server

Installation

yum install smeserver-extrarepositories-centos-sclo
yum --enablerepo=smecontribs install smeserver-mariadb105

then try PHPMyAdmin for better experience

Configuration

you can list the available configuration with the following command :

config show mariadb105-mariadb
config show mariadb105-mysql.init

Some of the properties are not shown, but are defaulted in a template or a script. Here a more comprehensive list with default and expected values :

property mariadb105-mariadb default values
LocalNetworkingOnly yes yes,no default provides only socket acces
TCPPort port empty keep empty for security prupose
port port number default 3313 if empty
access private, public,'' default empty for only localhost access
status enabled enabled,disabled
property mariadb105-mysql.init default values
status enabled enabled,disabled

Usage

you can access using command line with the following commands, a few similar ones. in doubt you can use the --socket=/var/lib/mysql/mariadb105.sock after the mysql command you want.

mysql105
msqlshow105 
mysqladmin105
mysqldump105 
mysqlimport105 
mysqlbinlog105

Alternatively:

The complete path to the specific version of mysql57 server with the mysql client would be:

/opt/rh/rh-mariadb105/root/usr/bin/mysql  --socket=/var/lib/mysql/mariadb105.sock

or

mysql --socket=/var/lib/mysql/mariadb105.sock


For Wordpress adjust the DB_HOST value in the wp-config.php file accordingly.

 define( 'DB_HOST', 'localhost:/var/lib/mysql/mariadb105.sock' );

or

 define( 'DB_HOST', '127.0.0.1:/var/lib/mysql/mariadb105.sock' );

some other php app migh need something like

 localhost;unix_socket=/var/lib/mysql/mariadb105.sock

Resetting the MySQL root password

To reset the password for the MySQL root account. The MySQL root user on SME Server has a random generated password which is generated during installation. You do not need to know this password to login to MySQL with root privileges on SME Server. If you might have changed the MySQL root password you can reset it like this after getting command line access as root user. Any restart of the server will do the job

systemctl restart mariadb105-mariadb.service

Uninstall

yum remove smeserver-mariadb105  rh-mariadb105*

Bugs

Please raise bugs under the SME-Contribs section in bugzilla

and select the smeserver-mariadb105 component or use this link


Below is an overview of the current issues for this contrib:

No open bugs found.

Changelog

Only released version in smecontrib are listed here.

smeserver-mariadb105 Changelog: SME 10 (smecontribs)

2023/11/23 Jean-Philippe Pialasse 2.7.0-18.sme
- fix OpenFilesLimit too low preventing backup [SME: 12417]

- deleting extra folder in /home/e-smith/db/mysql/ for mariadb10*
2022/12/11 Jean-Philippe Pialasse 2.7.0-17.sme
- fix mariadb overriding skip-networking for other versions [SME: 12262]
2022/07/11 Jean-Philippe Pialasse 2.7.0-16.sme
- use dedicated log file for *mysql.init [SME: 11953]
2022/06/07 John Crisp 2.7.0-15.sme
- Fix init for MariaDB 104+ [SME: 11991]
2022/04/10 Jean-Philippe Pialasse 2.7.0-14.sme
- /usr/libexec/mysql-wait-stop not used after mariadb101 [SME: 11936]