Koozali.org: home of the SME Server

Software collections and mysql 5.7

Offline Jean-Philippe Pialasse

  • *
  • 2,844
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Software collections and mysql 5.7
« Reply #15 on: May 22, 2019, 04:35:12 AM »
ran as above

subtility; not mysql57 but rh-mysql57 .... love it when naming convention evolves ! this is one of the worst thing with scl. You start working one way, and they present it differently for the next version

Code: [Select]
scl enable rh-mysql57  bash
also I have checked the rpm does not provides a /etc/profile.d/mysql55.sh but a /etc/profile.d/mysql57.sh

If you have the first you might have installed  also (or only) mysql55.

Offline jameswilson

  • *
  • 790
  • +0/-0
    • Security Warehouse, trade security equipment
Re: Software collections and mysql 5.7
« Reply #16 on: May 22, 2019, 04:44:14 PM »
OK
so i have tried
Quote
service mysql57-mysqld stop
expand-template /root/.my.cnf
expand-template /var/service/mysql57-mysqld/set.password
/opt/rh/rh-mysql57/root/usr/libexec/mysqld --socket=/var/lib/mysql/mysql57.sock --bootstrap --user=mysql --skip-grant-tables < /var/service/mysql57-mysqld/set.password
at this point i get
Quote
# /opt/rh/rh-mysql57/root/usr/libexec/mysqld --socket=/var/lib/mysql/mysql57.sock --bootstrap --user=mysql --skip-grant-tables < /var/service/mysql57-mysqld/set.password
/opt/rh/rh-mysql57/root/usr/libexec/mysqld: error while loading shared libraries: liblz4.so.rh-mysql57-1: cannot open shared object file: No such file or directory

Offline ReetP

  • *
  • 3,872
  • +5/-0
Re: Software collections and mysql 5.7
« Reply #17 on: May 22, 2019, 06:14:39 PM »
Have you tried to find out what directories you have there?

Work your way down (or up) and see what you can see - what is there? What is missing?eg

Code: [Select]
cd /opt/rh/rh-mysql57/root/usr/
Code: [Select]
cd /opt/rh/rh-mysql57/root/
Code: [Select]
cd /opt/rh/rh-mysql57/
Code: [Select]
cd /opt/rh/
or

Code: [Select]
ll /opt/rh/rh-mysql57
Code: [Select]
ll /opt/rh/
or use mc to browse about....

Or say:

Code: [Select]
cd /opt/rh
Code: [Select]
find -iname mysqld
A little bit of thought and looking may give you some answers rather than blindly following what others paste.

(people make typos etc, so always worth having a look around)
...
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 Jean-Philippe Pialasse

  • *
  • 2,844
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Software collections and mysql 5.7
« Reply #18 on: May 23, 2019, 05:23:56 AM »
While the exercise is interesting....

Trying to get back to the initial problem ie migrating db from mysql51 to mysql57

Signal-event pre-backup

Install smeserver-mysql57, just the yum step

cp /home/e-smith/db/mysql/*.dump /home/e-smith/db/mysql57

Then finish the install of mysql57 by doing the extra steps on wiki. It will do as you were restoring backups on a fresh sme

Offline jameswilson

  • *
  • 790
  • +0/-0
    • Security Warehouse, trade security equipment
Re: Software collections and mysql 5.7
« Reply #19 on: May 28, 2019, 11:26:37 AM »
Have you tried to find out what directories you have there?

Work your way down (or up) and see what you can see - what is there? What is missing?eg

Code: [Select]
cd /opt/rh/rh-mysql57/root/usr/
Code: [Select]
cd /opt/rh/rh-mysql57/root/
Code: [Select]
cd /opt/rh/rh-mysql57/
Code: [Select]
cd /opt/rh/
or

Code: [Select]
ll /opt/rh/rh-mysql57
Code: [Select]
ll /opt/rh/
or use mc to browse about....

Or say:

Code: [Select]
cd /opt/rh
Code: [Select]
find -iname mysqld
A little bit of thought and looking may give you some answers rather than blindly following what others paste.

(people make typos etc, so always worth having a look around)
Thanks I have done that and found a typo but as abive the error relating to file not found etc is called by another
Code: [Select]
liblz4.so.rh-mysql57-1 so i cant edit the command as such

Offline jameswilson

  • *
  • 790
  • +0/-0
    • Security Warehouse, trade security equipment
Re: Software collections and mysql 5.7
« Reply #20 on: May 28, 2019, 11:27:20 AM »
While the exercise is interesting....

Trying to get back to the initial problem ie migrating db from mysql51 to mysql57

Signal-event pre-backup

Install smeserver-mysql57, just the yum step

cp /home/e-smith/db/mysql/*.dump /home/e-smith/db/mysql57

Then finish the install of mysql57 by doing the extra steps on wiki. It will do as you were restoring backups on a fresh sme
That looks brilliant but until i fix the root password issue i assume i shoulndt try it?

Offline Jean-Philippe Pialasse

  • *
  • 2,844
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Software collections and mysql 5.7
« Reply #21 on: May 29, 2019, 05:56:10 AM »
That looks brilliant but until i fix the root password issue i assume i shoulndt try it?

the root password issue should fix by itself with the template expanding, and might have occurred by trying to play with it in the first place.

just tested:

https://wiki.contribs.org/Software_Collections:MySQL57
Code: [Select]
yum install --enablerepo=smecontribs smeserver-mysql57
signal-event post-upgrade ;  signal-event reboot

then

https://wiki.contribs.org/Software_Collections:MySQL57#Resetting_the_MySQL_root_password

Code: [Select]

service mysql57-mysqld stop
expand-template /root/.my.cnf
expand-template /var/service/mysql57-mysqld/set.password
scl enable rh-mysql57 bash
/opt/rh/rh-mysql57/root/usr/libexec/mysqld --socket=/var/lib/mysql/mysql57.sock --bootstrap --user=mysql --skip-grant-tables < /var/service/mysql57-mysqld/set.password
exit
service mysql57-mysqld start

Offline jameswilson

  • *
  • 790
  • +0/-0
    • Security Warehouse, trade security equipment
Re: Software collections and mysql 5.7
« Reply #22 on: May 29, 2019, 11:09:07 AM »
Thats brilliant and worked a treat. Im unsure why it didnt before. But yes all reset and working correctly.