Repository navigation
Option to switch to MySQL 5.7 #33
Description
Activity
On production Hypernodes we can do this with
hypernode-systemctl settings mysql_version --value 5.7but that doesn't work on the development Hypernodes.Correct,
hypernode-systemctl settings mysql_version --value 5.7does not work because that posts to the hypernode-api and then that triggers an ansible run on the Hypernode with the updated settings. In a hypernode-docker this doesn't work because there is no hn-api. For php we have included all versions inside the container image for easy switching, this is possible because the PHP packaging makes it easy to install PHP versions alongside each other.For MySQL this is not so simple. We're probably going to upgrade the default to 5.7 soon so this container will be updated, but for now you can do something like this in your Docker instance (or Dockerfile):
# pkill -f mysql || /bin/true # sed -i '/myisam-recover/d' /etc/mysql/my.cnf # sed -i '/thread_concurrency/d' /etc/mysql/conf.d/mysql-master.cnf # sed -i '/innodb_additional_mem_pool_size/d' /etc/mysql/conf.d/mysql-master.cnf # sed -i '/userstat/d' /etc/mysql/conf.d/mysql-master.cnf # apt-get update # apt-get install percona-server-client-5.7 percona-server-server-5.7 -y -q -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" # /usr/bin/screen -S hypernode_service_mysql -d -m bash -c 'until /usr/sbin/mysqld; do sleep 1; done' # # wait a bit for mysql to start # mysql_upgrade # pkill -f mysql # /usr/bin/screen -S hypernode_service_mysql -d -m bash -c 'until /usr/sbin/mysqld; do sleep 1; done' # # mysql --version # mysql Ver 14.14 Distrib 5.7.26-29, for debian-linux-gnu (x86_64) using 6.3Reacted by Farzad GhaneiIs it in the roadmap to provide this functionality out of the box? Maybe with some internal commands to automate the script that you mentioned @vdloo?
we're thinking about how we can provide configurable settings like this in the future in the docker more easily. currently we have nothing concrete on the roadmap for this specific option but we're planning to upgrade the hypernode platform from Ubuntu Xenial to Debian Buster in the coming months and with that also comes taking another good look at the docker. we might choose to just publish a docker for a bunch of different configurations because that would perhaps be the simplest for end-users
Reacted by Adrián Moreno PeñaReacted by Adrián Moreno Peña@zetxek for the Debian Buster BETA images we've now published different versions for different PHP / MySQL configurations. So you can now pull an image with the MySQL version you need instead of having to switch the version yourself in the container or a Dockerfile
https://support.hypernode.com/changelog/release-7279-beta-debian-buster-hypernode-docker-and-configuration-specific-images/
#39Reacted by Peter Jaap BlaakmeerReacted by Peter Jaap Blaakmeer@vdloo awesome! But why separate images instead of using tags?
Ie.
docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker:php56-mysql56 docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker:php70-mysql56And could you maybe also generate a
php74-mysql57(or dare I askphp74-mysql80)? Since Hypernode-Buster is still experimental anyway, rolling a PHP 7.4 version would fit neatly in that experiment?no real reason, might be better to chance that to tags soon. I do like having a 'latest' version because we intend to update the images but that could also be a tag 'php56-mysql56-latest'.
php7.4 is something we've looked at indeed, but we decided we're not rolling this out for the initial buster release as it does require some extra work for getting the PHP modules compatible and our main focus is making sure that whatever worked on xenial still works on buster. that said, now from our buster repo you will have access to a PHP 7.4 version we compiled:
root@be27d956603d ~ # apt-cache policy php7.4 php7.4: Installed: (none) Candidate: 7.4.5-1hypernode20200420.041700 Version table: 7.4.5-1hypernode20200420.041700 500 500 http://debian.hypernode.com buster/hypernode amd64 Packages root@be27d956603d ~ #perhaps you can get that to run with this and pulling in some external dependencies manually, but I have not looked that closely at PHP 7.4 yet. In the current state it will likely miss some crucial modules like igbinary and not be of much use.
Hi @peterjaap, we just built an image with PHP 7.4 in case you want to try that out:
docker.hypernode.com/byteinternet/hypernode-buster-docker-php74-mysql57:latest@vdloo awesome! But why separate images instead of using tags?
Ie.
docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker:php56-mysql56 docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker:php70-mysql56And could you maybe also generate a
php74-mysql57(or dare I askphp74-mysql80)? Since Hypernode-Buster is still experimental anyway, rolling a PHP 7.4 version would fit neatly in that experiment?Is there any news on the mysql 8.0 (dare i ask second).
@vdloo We're currently using docker.hypernode.com/byteinternet/hypernode-buster-docker-php74-mysql57 and it works for us. Thank you very much.
Is there any news on the mysql 8.0 (dare i ask second).
@vdloo We're currently using docker.hypernode.com/byteinternet/hypernode-buster-docker-php74-mysql57 and it works for us. Thank you very much.
Hey there @leonhelmus,
The MySQL 8.0 docker image is on our planning and will be coming up soon 🙂 we'll keep you updated on when this will be live.
Reacted by leonhelmusHey @leonhelmus and @peterjaap,
I'm happy to say that we now support MySQL 8.0 on all of our supported PHP versions! Pull the new docker image like the following example:
docker pull docker.hypernode.com/byteinternet/hypernode-buster-docker-php74-mysql80Login as usual, and check out the new MySQL version 🙂
app@4d840112382a:~$ mysql -V mysql Ver 8.0.19-10 for debian-linux-gnu on x86_64 (Percona Server (GPL), Release '10', Revision 'f446c04')You can check the catalog for all available docker images from our registry:
$ curl -s https://docker.hypernode.com/v2/_catalog | jq { "repositories": [ "byteinternet/hypernode-buster-docker", "byteinternet/hypernode-buster-docker-php56-mysql57", "byteinternet/hypernode-buster-docker-php56-mysql80", "byteinternet/hypernode-buster-docker-php71-mysql57", "byteinternet/hypernode-buster-docker-php71-mysql80", "byteinternet/hypernode-buster-docker-php72-mysql56", "byteinternet/hypernode-buster-docker-php72-mysql57", "byteinternet/hypernode-buster-docker-php72-mysql80", "byteinternet/hypernode-buster-docker-php73-mysql56", "byteinternet/hypernode-buster-docker-php73-mysql57", "byteinternet/hypernode-buster-docker-php73-mysql80", "byteinternet/hypernode-buster-docker-php74-mysql56", "byteinternet/hypernode-buster-docker-php74-mysql57", "byteinternet/hypernode-buster-docker-php74-mysql80", "byteinternet/hypernode-docker" ] }Reacted by Peter Jaap Blaakmeer and leonhelmus