Koozali.org: home of the SME Server

MySQL57 and port 3309

Offline michelandre

  • *
  • 261
  • +0/-0
MySQL57 and port 3309
« on: December 05, 2018, 09:31:18 PM »
Hi all,

I am testing mysql contribs: MySQL55 and MySQL57.

It looks like mysql55 is no more available.
https://wiki.contribs.org/Software_Collections:MySQL55

For Software Collections:MySQL57, I tried to make it to listen to port 3309 with no success.
https://wiki.contribs.org/Software_Collections:MySQL57

I think there is a typo:

Quote
or use TCP on port 3309:

/opt/rh/mysql55/root/usr/bin/mysql --protocol=TCP --port=3309


I should be:
Quote
/opt/rh/rh-mysql57/root/usr/bin/mysql  --port=3309

If I use the later, I am still in MySQL-5.1.73

Where do I go wrong?

I also test Software Collections:MariaDB (5.5).
https://wiki.contribs.org/Software_Collections:MariaDB which is olso no more available.

I changed to RH-MariaDB102 which is working well on port 3307 or other ports but I wonder about security!

Michel-André
« Last Edit: December 10, 2018, 03:57:23 AM by michelandre »

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: MySQL57 and port 3309
« Reply #1 on: December 06, 2018, 02:01:33 AM »
Check the section on Usage, sockets and 127.0.0.1 vs localhost here:

https://wiki.contribs.org/Software_Collections:MySQL55

Same applies for 57 I believe.

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline michelandre

  • *
  • 261
  • +0/-0
Re: MySQL57 and port 3309
« Reply #2 on: December 06, 2018, 02:11:10 AM »
Already read and tried long before my post...

Michel-André

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: MySQL57 and port 3309
« Reply #3 on: December 06, 2018, 02:24:38 PM »
Hi all,

I am testing mysql contribs: MySQL55 and MySQL57.

It looks like mysql55 is no more available.
https://wiki.contribs.org/Software_Collections:MySQL55

What makes you say that ? Did you try it?

Here's my quick test just now.... note you MUST do an IMMEDIATE signal-event post-upgrade or you MAY run foul of https://bugs.contribs.org/show_bug.cgi?id=10160

Apart from that, and the rather annoying PHP bug, it runs as advertised (my main CRM runs on it here and now)


Code: [Select]
config show mysql55-mysqld
mysql55-mysqld=service
    LocalNetworkingOnly=no
    status=enabled

Quote
netstat -atn |grep 3307
tcp        0      0 0.0.0.0:3307                0.0.0.0:*                   LISTEN


Quote
ll /var/lib/mysql/*.sock
srwxrwxrwx 1 mysql mysql 0 Nov 21 23:53 /var/lib/mysql/mysql55.sock
srwxrwxrwx 1 mysql mysql 0 Nov 21 23:53 /var/lib/mysql/mysql.sock

Quote
[root@server ~]# mysql55
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 117
Server version: 5.5.52 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql>

Or this

Quote
[root@server ~]# /opt/rh/mysql55/root/usr/bin/mysql  --socket=/var/lib/mysql/mysql55.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 118
Server version: 5.5.52 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql>

Quote
[root@test ~]# yum --enablerepo=smecontribs,centos-sclo-rh install smeserver-mysql55
Loaded plugins: fastestmirror, post-transaction-actions, smeserver
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: rep-centos-fr.upress.io
 * remi-safe: rpms.remirepo.net
 * smeaddons: mirror.pialasse.com
 * smecontribs: mirror.pialasse.com
 * smeextras: mirror.pialasse.com
 * smeos: mirror.pialasse.com
 * smeupdates: mirror.pialasse.com
 * updates: centos.quelquesmots.fr
base                                                                                                                                                                                | 3.7 kB     00:00     
centos-sclo-rh                                                                                                                                                                      | 2.9 kB     00:00     
centos-sclo-rh/primary_db                                                                                                                                                           | 1.2 MB     00:00     
remi-safe                                                                                                                                                                           | 3.0 kB     00:00     
remi-safe/primary_db                                                                                                                                                                | 1.1 MB     00:00     
smeaddons                                                                                                                                                                           | 2.9 kB     00:00     
smecontribs                                                                                                                                                                         | 2.9 kB     00:00     
smeextras                                                                                                                                                                           | 2.9 kB     00:00     
smeos                                                                                                                                                                               | 3.1 kB     00:00     
smeupdates                                                                                                                                                                          | 2.9 kB     00:00     
updates                                                                                                                                                                             | 3.4 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package smeserver-mysql55.noarch 0:2.0.0-8.el6.sme will be installed
--> Processing Dependency: mysql55-runtime for package: smeserver-mysql55-2.0.0-8.el6.sme.noarch
--> Processing Dependency: mysql55-mysql-server for package: smeserver-mysql55-2.0.0-8.el6.sme.noarch
--> Processing Dependency: mysql55-mysql-libs for package: smeserver-mysql55-2.0.0-8.el6.sme.noarch
--> Processing Dependency: mysql55-mysql for package: smeserver-mysql55-2.0.0-8.el6.sme.noarch
--> Processing Dependency: mysql55 for package: smeserver-mysql55-2.0.0-8.el6.sme.noarch
--> Running transaction check
---> Package mysql55.x86_64 0:1.1-23.sc1.el6 will be installed
---> Package mysql55-mysql.x86_64 0:5.5.52-1.el6 will be installed
---> Package mysql55-mysql-libs.x86_64 0:5.5.52-1.el6 will be installed
---> Package mysql55-mysql-server.x86_64 0:5.5.52-1.el6 will be installed
---> Package mysql55-runtime.x86_64 0:1.1-23.sc1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================================================================
 Package                                                 Arch                                      Version                                            Repository                                      Size
===========================================================================================================================================================================================================
Installing:
 smeserver-mysql55                                       noarch                                    2.0.0-8.el6.sme                                    smecontribs                                     31 k
Installing for dependencies:
 mysql55                                                 x86_64                                    1.1-23.sc1.el6                                     smecontribs                                    5.2 k
 mysql55-mysql                                           x86_64                                    5.5.52-1.el6                                       smecontribs                                    5.8 M
 mysql55-mysql-libs                                      x86_64                                    5.5.52-1.el6                                       smecontribs                                    219 k
 mysql55-mysql-server                                    x86_64                                    5.5.52-1.el6                                       smecontribs                                     10 M
 mysql55-runtime                                         x86_64                                    1.1-23.sc1.el6                                     smecontribs                                    1.0 M

Transaction Summary
===========================================================================================================================================================================================================
Install       6 Package(s)

Total download size: 17 M
Installed size: 78 M
Is this ok [y/N]:
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline michelandre

  • *
  • 261
  • +0/-0
Re: MySQL57 and port 3309
« Reply #4 on: December 07, 2018, 03:13:19 AM »
Hi ReetP,

I do not know what I did before but, this time MySQL55 is working as written in the Contrib. The only problem with this version is that it will reach "Ext. Support End" the 31st of decembrer 2018.

The solution is to try MySQL57 or MariaDB102. If I remember right, both end in 2023.

MySQL57 looks easier to adjust then MariaDB102 as it creates template fragments as does't MariaDB. But I thing (the LIBRE way) MariaDB is a better choice as it will be more advanced with its next version.

Any way, both Contribs texts need  a refresh...

Michel-André
« Last Edit: December 07, 2018, 03:16:24 AM by michelandre »

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: MySQL57 and port 3309
« Reply #5 on: December 07, 2018, 10:49:23 AM »
Because Mysql is released via RHEL you will probably find that like PHP, it is supported by RHEL for security patches until the distro goes EOL.

So around Dec 2020 for CentOS 6.

MariaDB should install though I have not tested.

https://wiki.contribs.org/Software_Collections:MariaDB

Please let us know if there are any changes required (I did do some small mods on the scl contrib recently and will do more if you tell me what you require....)
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline michelandre

  • *
  • 261
  • +0/-0
Re: MySQL57 and port 3309
« Reply #6 on: December 08, 2018, 01:58:57 AM »
Hi ReetP

I tried mariadb 55 and 102

Code: [Select]
##########
########## Repository: https://www.softwarecollections.org/repos/rhscl/mariadb55/epel-6-x86_64/


/sbin/e-smith/db yum_repositories set scl-mariadb55 repository \
Name 'Centos - RH Software Collections' \
BaseURL 'https://www.softwarecollections.org/repos/rhscl/mariadb55/epel-6-x86_64/' \
EnableGroups no \
Visible yes \
status disabled

# signal-event yum-modify

# yum install  -y mariadb55-mariadb-test  --enablerepo=scl-mariadb55

##########
########## Adjust my.conf // 
# vi /opt/rh/mariadb55/root/etc/my.cnf


[mysqld]
datadir=/opt/rh/mariadb55/root/var/lib/mysql

# Comment the line below
#socket=/var/lib/mysql/mysql.sock

# Add the 2 lines below
socket=/var/lib/mysql/mariadb55.sock
port=3308
...

##########
########## TESTING #####
# cd /opt/rh/mariadb55/root/usr/share/mysql-test

# sudo -u mysql ./mysql-test-run --skip-test-list=rh-skipped-tests.list

##########
Passes all except the ones requiring: debug_sync
Example:
rpl.rpl_mdev359 'mix'                    [ skipped ]  debug_sync is not available

##########
########## To clean up afterwards, remove the created "var" subdirectory, eg
# sudo -u mysql rm -rf /opt/rh/mariadb55/root/usr/share/mysql-test/var

For the 55 and 102, I did with or without networking:
Code: [Select]
scl enable rh-mariadb102 -- '/opt/rh/rh-mariadb102/root/usr/bin/mysql_secure_installation'with the root password in:  /root/.my.cnf

When I try;
Code: [Select]
/opt/rh/mariadb55/root/usr/bin/mysql
I still end up in MySQL-5.1.73. Same with 102.

I am doing something wrong but cannot find what.

Michel-André

PS: in yum install mariadb55 --enablrepo=scl-mariadb55 there is typo in: enablrepo  = enablerepo



Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: MySQL57 and port 3309
« Reply #7 on: December 08, 2018, 02:10:11 AM »
MySQL 55, 57 and MariaDB with contribs should all 'just work'.

We don't guarantee anything else :-)

I know Mysql55 works as that is what I am running via the contrib.

I'm away on business at the minute but back home Saturday night.

I'll try and take a look Sunday for you.

Give me a bit of time.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Online TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: MySQL57 and port 3309
« Reply #8 on: December 08, 2018, 09:30:12 AM »
https://wiki.contribs.org/Software_Collections:MySQL57

Clean sme9.2 vm updates as at 8 Dec

[root@sme92x64 ~]# rpm -qa smeserver-yum
smeserver-yum-2.4.0-17.el6.sme.noarch

[root@sme92x64 ~]# yum install --enablerepo=smecontribs smeserver-mysql57
signal-event post-upgrade ;  signal-event reboot

[root@sme92x64 ~]# signal-event post-upgrade; signal-event reboot

[root@sme92x64 ~]# /opt/rh/rh-mysql57/root/usr/bin/mysql  --socket=/var/lib/mysql/mysql57.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.7.16 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql>

[root@sme92x64 ~]# mysql57
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.16 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql>

Works for me...
--
qui scribit bis legit

Offline michelandre

  • *
  • 261
  • +0/-0
Re: MySQL57 and port 3309
« Reply #9 on: December 08, 2018, 09:03:47 PM »
Hi TerryF,

Thank you for your precious time.

SME-9.2 is a VM, Server Only, IP: 192.168.1.11, GW: 192.168.1.1

MyQL57 installed without problem and working perfectly.

I want to use a port to access MySQL57 as I want to test Dolibarr-8.0.3 running in dolibarr i-bay. //  Collections:PHP is installed and PHP71 is set on that i-bay only. PHP72/73 are not working with this application.

I am confused a little bit (but on a higher level) about adding the port:
- Do I use a custom template fragment?
- If so, do I modify an already existing one (which one"s") or create a new one"s"?
- In a fragment, will I use port=3309?
- Do I remove "socket=/var/lib/mysql/mysql57.sock"?
- Do I remove "skip-networking" (which is used for security reasons) and/or do I use LocalNetworkingOnly=yes?
- Expand what?
- Do I set config properties like TCPPort=3309, UDPPort=3309, and access=private in mysql57-mysqld?
* I am reading a lot of things on SQL, bugs, contribs etc...

Why is there the same parameters in /etc/opt/rh/rh-mysql57/my.cnf.d/rh-mysql57-mysql-server.cnf and in /etc/opt/rh/rh-mysql57/my.cnf. Is it because one is for server and the other one for client if so, why is it under the same heading [mysqld]?

/etc/opt/rh/rh-mysql57/my.cnf.d/rh-mysql57-mysql-server.cnf   

Code: [Select]
[mysqld]
datadir=/var/opt/rh/rh-mysql57/lib/mysql                ##### 1 (different from the one below)
socket=/var/lib/mysql/mysql.sock                        ##### 2 (same as standard MyQL-5.1.73 on SME)
log-error=/var/opt/rh/rh-mysql57/log/mysql/mysqld.log   ##### 3 (different from the one below)
pid-file=/var/run/rh-mysql57-mysqld/mysqld.pid          ##### 4

/etc/opt/rh/rh-mysql57/my.cnf
Code: [Select]
[mysqld]
log-error=/var/log/mysql57-mysqld.log                    ##### 3
explicit_defaults_for_timestamp = 1
log_timestamps = SYSTEM

pid-file=/var/run/rh-mysql57-mysqld/mysqld.pid           ##### 4
basedir=/opt/rh/rh-mysql57/root/usr
datadir=/opt/rh/rh-mysql57/root/var/lib/mysql            ##### 1
lc-messages-dir=/opt/rh/rh-mysql57/root/usr/share/rh-mysql57-mysql/english/
socket=/var/lib/mysql/mysql57.sock                       ##### 2
skip-networking

On top of that, when MySQL57 will be running correctly using a port, I would like to replace it with RH-MariaDB102 and write a HowTo about it...

I have a lot on my table and I thank everyone putting their 2¢ so I will get less poor,


Michel-André

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: MySQL57 and port 3309
« Reply #10 on: December 08, 2018, 09:33:42 PM »
As per the wiki it defaults to socket only.

You need modify the key to enable a port.

But you should NOT need any custom templates

See Usage here. Should be the same for 57.

https://wiki.contribs.org/Software_Collections:MySQL55

E.g

Code: [Select]
config setprop mysql55-mysqld port 3307 LocalNetworkingOnly no signal-event post-upgrade;signal-event reboot
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Online TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: MySQL57 and port 3309
« Reply #11 on: December 08, 2018, 10:07:34 PM »
[root@sme92x64 ~]# config setprop mysql57-mysqld port 3309 LocalNetworkingOnly no
[root@sme92x64 ~]# config show mysql57-mysqld
mysql57-mysqld=service
    LocalNetworkingOnly=no
    port=3309
    status=enabled

[root@sme92x64 ~]# netstat -atn |grep 3309
tcp        0      0 :::3309                     :::*                        LISTEN

[root@sme92x64 ~]# /opt/rh/rh-mysql57/root/usr/bin/mysql --protocol=TCP --port=3309
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.16 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql>
--
qui scribit bis legit

Online TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: MySQL57 and port 3309
« Reply #12 on: December 08, 2018, 10:50:05 PM »
--
qui scribit bis legit

Offline michelandre

  • *
  • 261
  • +0/-0
Re: MySQL57 and port 3309
« Reply #13 on: December 09, 2018, 07:08:48 AM »
Hi TerryF,

At last, it is working with MySQL57. :lol:

Tomorrow, I will describe what I did. I also have to verify security...

Thank you for your great support,

Michel-André

Online TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: MySQL57 and port 3309
« Reply #14 on: December 09, 2018, 07:21:07 AM »
Hi TerryF,
Thank you for your great support,

ReetP taught me everything I know :-)
--
qui scribit bis legit