6,089 bytes added
, 03:37, 13 March 2022
{{Languages}}
<!-- here we define the contrib name variable -->
<!-- we get the page title, remove suffix for translated version; if needed you can define there with the value you want-->
{{#vardefine:contribname| {{lc: {{#titleparts: {{BASEPAGENAME}} |1}} }} }}
{{#vardefine:smecontribname| smeserver-{{lc: {{#titleparts: {{BASEPAGENAME}} |1}} }} }}
<!-- we define the language -->
{{#vardefine:lang| {{lc: {{#titleparts: {{PAGENAME}} | | -1}} }} |en }}
{{Warning box|1=currently in alpha test stage, please use only on test server and use --enablerepo=smetest with yum commands}}{{Infobox contribs
|name={{#var:contribname}}
|image=Mariadb-logo-vert_blue-transparent.png
|description_image= {{#var:contribname}} logo
|maintainer= unnilennium
|licence=
|url= https://mariadb.com
|category= database
|tags=mariadb,mysql,db,database
}}
===Maintainer===
<!-- here you need to file your username and name -->
[[User:Unnilennium|Jean-Philippe Pialasse]]
=== Version ===
<!-- keep this first element as is, you can add some if needed -->
{{#smeversion: {{#var:smecontribname}} }}
=== Description ===
Koozali SME Server configuration package for mariadb102 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 mariadb102 ( except innoDB options).
Only difference is to prefix mariadb and mysql.init db entry by "mariadb102-". ie: mariadb102-mariadb and mariadb102-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 ===
<tabs container><tab name="For SME 10">
yum install smeserver-extrarepositories-centos-sclo
yum --enablerepo=smecontribs install {{#var:smecontribname}}
then try [[PHPMyAdmin]] for better experience
</tab>
</tabs>
=== Configuration ===
you can list the available configuration with the following command :
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 :
{| class="wikitable"
!property {{#var:contribname}}-mariadb
!default
!values
!
|-
|LocalNetworkingOnly
|yes
|yes,no
|default provides only socket acces
|-
|TCPPort
|
|port empty
|keep empty for security prupose
|-
|port
|
|port number
|default 3311 if empty
|-
|access
|
|private, public,<nowiki>''</nowiki>
|default empty for only localhost access
|-
|status
|enabled
|enabled,disabled
|
|}
{| class="wikitable"
!property {{#var:contribname}}-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/mariadb102.sock after the mysql command you want.
mysql102
msqlshow102
mysqladmin102
mysqldump102
mysqlimport102
mysqlbinlog102
Alternatively:
The complete path to the specific version of mysql57 server with the mysql client would be:
/opt/rh/rh-mariadb102/root/usr/bin/mysql --socket=/var/lib/mysql/mariadb102.sock
or
mysql --socket=/var/lib/mysql/mariadb102.sock
For Wordpress adjust the DB_HOST value in the wp-config.php file accordingly.
define( 'DB_HOST', 'localhost:/var/lib/mysql/mariadb102.sock' );
or
define( 'DB_HOST', '127.0.0.1:/var/lib/mysql/mariadb102.sock' );
some other php app migh need something like
localhost;unix_socket=/var/lib/mysql/mariadb102.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 ===
yum remove {{#var:smecontribname}} rh-{{#var:contribname}}*
=== Bugs ===
Please raise bugs under the SME-Contribs section in {{BugzillaFileBug|product=|component=|title= bugzilla}}
and select the {{#var:smecontribname}} component or use {{BugzillaFileBug|product=SME%20Contribs|component={{#var:smecontribname}}|title=this link}}
Below is an overview of the current issues for this contrib:{{#bugzilla:columns=id,product,version,status,summary|sort=id|order=desc|component={{#var:smecontribname}} |noresultsmessage=No open bugs found.}}
===Changelog===
Only released version in smecontrib are listed here.
{{ #smechangelog: {{#var:smecontribname}} }}
<!-- list of category you want to see this page in -->
[[Category: Contrib]]
<!-- Please keep there the template revision number as is -->
[[contribtemplate::2| ]]