You are here

News

What are the differences between MySQL Community and MySQL Enterprise Server 5.7

Shinguz - Tue, 2016-10-25 22:26
The MySQL Server itself

The differences between the MySQL Community Server and the MySQL Enterprise Server 5.7 are as follows as claimed by Oracle:

  • The license of the MySQL Server
  • Only MySQL Enterprise Edition has the Enterprise plug-ins (Thread Pool, PAM, Audit, etc.)
  • Certifications and Indemnification support for the MySQL Enterprise Server
  • The MySQL Community Server statically links against yaSSL and readline vs MySQL Enterprise Server OpenSSL and libedit
The license of the MySQL Server

The MySQL Community Server is licensed under the GNU General Public License version 2 whereas the MySQL Enterprise Server is under an Oracle proprietary license as you can see from the following diffs of 2 random files:

shell> diff mysql-5.7.16-linux-glibc2.5-x86_64/share/charsets/latin1.xml mysql-advanced-5.7.16-linux-glibc2.5-x86_64/share/charsets/latin1.xml 6,7c6,7 < Copyright (c) 2003, 2005 MySQL AB < Use is subject to license terms --- > Copyright (c) 2003, 2005 MySQL AB > Use is subject to license terms. 9,20c9,20 < This program is free software; you can redistribute it and/or modify < it under the terms of the GNU General Public License as published by < the Free Software Foundation; version 2 of the License. < < This program is distributed in the hope that it will be useful, < but WITHOUT ANY WARRANTY; without even the implied warranty of < MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the < GNU General Public License for more details. < < You should have received a copy of the GNU General Public License < along with this program; if not, write to the Free Software < Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA --- > > > > > > > > > > > > The lines above are intentionally left blank

This information can also be found in the following files:

mysql-5.7.16-linux-glibc2.5-x86_64/COPYING GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. ... mysql-5.7.16-linux-glibc2.5-x86_64/README MySQL Server 5.7 This is a release of MySQL, a dual-license SQL database server. For the avoidance of doubt, this particular copy of the software is released under the version 2 of the GNU General Public License. MySQL is brought to you by Oracle. ... mysql-advanced-5.7.16-linux-glibc2.5-x86_64/LICENSE.mysql MySQL Server Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. ... mysql-advanced-5.7.16-linux-glibc2.5-x86_64/README MySQL Server 5.x This is a release of MySQL, a dual-license SQL database server. For the avoidance of doubt, this particular copy of the software is released under a commercial license and the GNU General Public License does not apply. MySQL is brought to you by Oracle. ...
Enterprise plug-ins of the MySQL Enterprise Server

Oracle/MySQL follows the open core business model with the MySQL Server. This means: The MySQL Community Server is the same as the MySQL Enterprise Server but the MySQL Enterprise Server has some additional modules and programs compared to the MySQL Community Server:

  • MySQL Enterprise Backup
  • MySQL Enterprise Monitor
  • MySQL Enterprise Security
  • MySQL Enterprise Audit

See also: MySQL Enterprise Edition.

If we check this in the packages we find the following additional plug-ins in the MySQL Enterprise Server:

shell> ls -la mysql-advanced-5.7.16-linux-glibc2.5-x86_64/lib/plugin: -rwxr-xr-x 1 mysql mysql 3556085 Sep 28 19:35 audit_log.so -rwxr-xr-x 1 mysql mysql 73855 Sep 28 19:35 authentication_pam.so -rwxr-xr-x 1 mysql mysql 1595720 Sep 28 19:35 firewall.so -rwxr-xr-x 1 mysql mysql 3748543 Sep 28 19:35 keyring_okv.so -rwxr-xr-x 1 mysql mysql 2283844 Sep 28 19:35 openssl_udf.so -rwxr-xr-x 1 mysql mysql 567032 Sep 28 19:34 thread_pool.so
MySQL Enterprise Server Certifications and Indemnification support

This is legal stuff. I only care about technical problems... If you have Open Source legal questions please get in contact with us and we will direct you to lawyers which are specialised in this topic.

Different libraries

The MySQL Community Server statically links against yaSSL and readline vs MySQL Enterprise Server against OpenSSL and libedit.

This is one one side a legal stuff GPL vs BSD license. On the other side it is a political question. Unfortunately the OpenSSL used in the MySQL Enterprise Server is actually a bit more feature reach than yaSSL.

We can also see the differences between the different SSL libraries when we search for the symbols:

shell> grep -ic yassl *.mysqld community.mysqld:1118 enterprise.mysqld:0 shell> grep -ic openssl *.mysqld community.mysqld:3 enterprise.mysqld:38 shell]> grep -i openssl community.mysql yaOpenSSL_add_all_algorithms _ZL16Sys_have_openssl _ZN8TaoCrypt18RSA_Public_Decoder17ReadHeaderOpenSSLEv
Other technical comparisons

Beside of the described findings above I am a very curious child...

It seems like we can find here some build info:

shell> ll mysql-5.7.16-linux-glibc2.5-x86_64/docs/INFO_BIN mysql-advanced-5.7.16-linux-glibc2.5-x86_64/docs/INFO_BIN -rw-r--r-- 1 mysql mysql 5672 Sep 28 20:14 mysql-5.7.16-linux-glibc2.5-x86_64/docs/INFO_BIN -rw-r--r-- 1 mysql mysql 5969 Sep 28 19:45 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/docs/INFO_BIN shell> diff mysql-5.7.16-linux-glibc2.5-x86_64/docs/INFO_BIN mysql-advanced-5.7.16-linux-glibc2.5-x86_64/docs/INFO_BIN 10,13c10,13 < C_FLAGS = -fPIC -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -I/export/home/somepath/release/include -I/export/home/somepath/mysql-5.7.16/extra/rapidjson/include -I/export/home/somepath/release/libbinlogevents/include -I/export/home/somepath/mysql-5.7.16/libbinlogevents/export -I/export/home/somepath/mysql-5.7.16/include -I/export/home/somepath/mysql-5.7.16/sql/conn_handler -I/export/home/somepath/mysql-5.7.16/libbinlogevents/include -I/export/home/somepath/mysql-5.7.16/sql -I/export/home/somepath/mysql-5.7.16/sql/auth -I/export/home/somepath/mysql-5.7.16/regex -I/export/home/somepath/mysql-5.7.16/zlib -I/export/home/somepath/mysql-5.7.16/extra/yassl/include -I/export/home/somepath/mysql-5.7.16/extra/yassl/taocrypt/include -I/export/home/somepath/release/sql -I/export/home/somepath/mysql-5.7.16/extra/lz4 -DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED < C_DEFINES = -DHAVE_CONFIG_H -DHAVE_LIBEVENT1 -DHAVE_REPLICATION -DMYSQL_SERVER -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE < CXX_FLAGS = -fPIC -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -I/export/home/somepath/release/include -I/export/home/somepath/mysql-5.7.16/extra/rapidjson/include -I/export/home/somepath/release/libbinlogevents/include -I/export/home/somepath/mysql-5.7.16/libbinlogevents/export -I/export/home/somepath/mysql-5.7.16/include -I/export/home/somepath/mysql-5.7.16/sql/conn_handler -I/export/home/somepath/mysql-5.7.16/libbinlogevents/include -I/export/home/somepath/mysql-5.7.16/sql -I/export/home/somepath/mysql-5.7.16/sql/auth -I/export/home/somepath/mysql-5.7.16/regex -I/export/home/somepath/mysql-5.7.16/zlib -I/export/home/somepath/mysql-5.7.16/extra/yassl/include -I/export/home/somepath/mysql-5.7.16/extra/yassl/taocrypt/include -I/export/home/somepath/release/sql -I/export/home/somepath/mysql-5.7.16/extra/lz4 -DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED < CXX_DEFINES = -DHAVE_CONFIG_H -DHAVE_LIBEVENT1 -DHAVE_REPLICATION -DMYSQL_SERVER -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE --- > C_FLAGS = -fPIC -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -I/export/home/somepath/release/include -I/export/home/somepath/mysqlcom-pro-5.7.16/extra/rapidjson/include -I/export/home/somepath/release/libbinlogevents/include -I/export/home/somepath/mysqlcom-pro-5.7.16/libbinlogevents/export -I/export/home/somepath/mysqlcom-pro-5.7.16/include -I/export/home/somepath/mysqlcom-pro-5.7.16/sql/conn_handler -I/export/home/somepath/mysqlcom-pro-5.7.16/libbinlogevents/include -I/export/home/somepath/mysqlcom-pro-5.7.16/sql -I/export/home/somepath/mysqlcom-pro-5.7.16/sql/auth -I/export/home/somepath/mysqlcom-pro-5.7.16/regex -I/export/home/somepath/mysqlcom-pro-5.7.16/zlib -I/export/home/somepath/dep4/include -I/export/home/somepath/release/sql -I/export/home/somepath/mysqlcom-pro-5.7.16/extra/lz4 > C_DEFINES = -DHAVE_CONFIG_H -DHAVE_LIBEVENT1 -DHAVE_OPENSSL -DHAVE_REPLICATION -DMYSQL_SERVER -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE > CXX_FLAGS = -fPIC -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -I/export/home/somepath/release/include -I/export/home/somepath/mysqlcom-pro-5.7.16/extra/rapidjson/include -I/export/home/somepath/release/libbinlogevents/include -I/export/home/somepath/mysqlcom-pro-5.7.16/libbinlogevents/export -I/export/home/somepath/mysqlcom-pro-5.7.16/include -I/export/home/somepath/mysqlcom-pro-5.7.16/sql/conn_handler -I/export/home/somepath/mysqlcom-pro-5.7.16/libbinlogevents/include -I/export/home/somepath/mysqlcom-pro-5.7.16/sql -I/export/home/somepath/mysqlcom-pro-5.7.16/sql/auth -I/export/home/somepath/mysqlcom-pro-5.7.16/regex -I/export/home/somepath/mysqlcom-pro-5.7.16/zlib -I/export/home/somepath/dep4/include -I/export/home/somepath/release/sql -I/export/home/somepath/mysqlcom-pro-5.7.16/extra/lz4 > CXX_DEFINES = -DHAVE_CONFIG_H -DHAVE_LIBEVENT1 -DHAVE_OPENSSL -DHAVE_REPLICATION -DMYSQL_SERVER -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE 23a24 > CRYPTO_LIBRARY:FILEPATH=/export/home/somepath/dep4/lib/libcrypto.a 34c35 < FEATURE_SET:STRING=community --- > FEATURE_SET:STRING=xlarge 44a46,48 > OPENSSL_INCLUDE_DIR:PATH=/export/home/somepath/dep4/include > OPENSSL_LIBRARY:FILEPATH=/export/home/somepath/dep4/lib/libssl.a > OPENSSL_ROOT_DIR:PATH=/export/home/somepath/dep4 73c77,78 < WITH_SSL:STRING=bundled --- > WITH_SSL:STRING=/export/home/somepath/dep4 > WITH_SSL_PATH:PATH=/export/home/somepath/dep4

The size of the contents is more or less the same (22 Mbyte difference):

shell> du -ksc mysql*5.7.16-linux*/* 1355480 mysql-5.7.16-linux-glibc2.5-x86_64/bin 20 mysql-5.7.16-linux-glibc2.5-x86_64/COPYING 20 mysql-5.7.16-linux-glibc2.5-x86_64/docs 1220 mysql-5.7.16-linux-glibc2.5-x86_64/include 1217880 mysql-5.7.16-linux-glibc2.5-x86_64/lib 836 mysql-5.7.16-linux-glibc2.5-x86_64/man 4 mysql-5.7.16-linux-glibc2.5-x86_64/README 4144 mysql-5.7.16-linux-glibc2.5-x86_64/share 32 mysql-5.7.16-linux-glibc2.5-x86_64/support-files 2579636 mysql-5.7.16-linux-glibc2.5-x86_64 1345864 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin 4 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/LICENSE.mysql 15664 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/docs 1188 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/include 1233168 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/lib 988 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/man 4 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/README 4144 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/share 32 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/support-files 2601060 mysql-advanced-5.7.16-linux-glibc2.5-x86_64

The biggest difference we see in the docs folder where the mysql.info file is located (left over from clean-up?):

shell> ll mysql-advanced-5.7.16-linux-glibc2.5-x86_64/docs -rw-r--r-- 1 mysql mysql 1789 Sep 28 19:06 ChangeLog -rw-r--r-- 1 mysql mysql 5969 Sep 28 19:45 INFO_BIN -rw-r--r-- 1 mysql mysql 185 Sep 28 19:34 INFO_SRC -rw-r--r-- 1 mysql mysql 16017476 Sep 28 19:06 mysql.info

If we want to see the different number of files:

for i in $(find mysql*5.7.16-linux* -maxdepth 1 -type d) ; do echo -n $i": " ; ( find $i -type f | wc -l ) ; done mysql-5.7.16-linux-glibc2.5-x86_64/support-files: 5 mysql-5.7.16-linux-glibc2.5-x86_64/share: 62 mysql-5.7.16-linux-glibc2.5-x86_64/man: 41 mysql-5.7.16-linux-glibc2.5-x86_64/bin: 38 mysql-5.7.16-linux-glibc2.5-x86_64/lib: 116 mysql-5.7.16-linux-glibc2.5-x86_64/docs: 3 mysql-5.7.16-linux-glibc2.5-x86_64/include: 107 mysql-5.7.16-linux-glibc2.5-x86_64: 374 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/support-files: 5 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/share: 66 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/man: 41 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin: 38 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/lib: 128 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/docs: 4 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/include: 107 mysql-advanced-5.7.16-linux-glibc2.5-x86_64: 391

Those are the important differences:

-rw-r--r-- 1 mysql mysql 1046 Sep 28 19:02 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/share/audit_log_filter_linux_install.sql -rw-r--r-- 1 mysql mysql 1052 Sep 28 19:02 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/share/audit_log_filter_win_install.sql -rw-r--r-- 1 mysql mysql 239 Sep 28 19:33 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/share/uninstall_rewriter.sql -rw-r--r-- 1 mysql mysql 2207 Sep 28 19:02 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/share/win_install_firewall.sql -rw-r--r-- 1 mysql mysql 16017476 Sep 28 19:06 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/docs/mysql.info -rwxr-xr-x 1 mysql mysql 3556085 Sep 28 19:35 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/lib/plugin/audit_log.so -rwxr-xr-x 1 mysql mysql 73855 Sep 28 19:35 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/lib/plugin/authentication_pam.so -rwxr-xr-x 1 mysql mysql 1595720 Sep 28 19:35 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/lib/plugin/firewall.so -rwxr-xr-x 1 mysql mysql 3748543 Sep 28 19:35 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/lib/plugin/keyring_okv.so -rwxr-xr-x 1 mysql mysql 2283844 Sep 28 19:35 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/lib/plugin/openssl_udf.so -rwxr-xr-x 1 mysql mysql 567032 Sep 28 19:34 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/lib/plugin/thread_pool.so

So basically all MySQL Enterprise Server feature files.

The most imporant MySQL binaries Let us have a look at the most important MySQL binaries: shell> ll mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql shell> ll mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqlbinlog mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqlbinlog shell> ll mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqld mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqld shell> ll mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqldump mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqldump shell> ll mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql_install_db mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql_install_db shell> ll mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql_upgrade mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql_upgrade -rwxr-xr-x 1 mysql mysql 10884339 Sep 28 20:04 mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql -rwxr-xr-x 1 mysql mysql 9815101 Sep 28 19:38 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql -rwxr-xr-x 1 mysql mysql 11780342 Sep 28 20:06 mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqlbinlog -rwxr-xr-x 1 mysql mysql 10711774 Sep 28 19:39 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqlbinlog -rwxr-xr-x 1 mysql mysql 253303409 Sep 28 20:11 mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqld -rwxr-xr-x 1 mysql mysql 253876847 Sep 28 19:42 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqld -rwxr-xr-x 1 mysql mysql 9989115 Sep 28 20:06 mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqldump -rwxr-xr-x 1 mysql mysql 8921087 Sep 28 19:39 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqldump -rwxr-xr-x 1 mysql mysql 10711017 Sep 28 20:04 mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql_install_db -rwxr-xr-x 1 mysql mysql 8883445 Sep 28 19:38 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql_install_db -rwxr-xr-x 1 mysql mysql 13025173 Sep 28 20:07 mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql_upgrade -rwxr-xr-x 1 mysql mysql 11961246 Sep 28 19:40 mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql_upgrade

Here you can see some differences I cannot explain. Possibly they come from the use of the SSL and libedit/readline libraries?

The files are basicaly of the same type/style:

shell> file mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql shell> file mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqlbinlog mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqlbinlog shell> file mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqld mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqld shell> file mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqldump mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqldump shell> file mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql_install_db mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql_install_db shell> file mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql_upgrade mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql_upgrade mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqlbinlog: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqlbinlog: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqld: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqld: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqldump: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqldump: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql_install_db: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql_install_db: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql_upgrade: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql_upgrade: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped

When we look into the symbol tables of those 6 binaries we can see some differences which IMHO are mostly caused because of the 2 different set of libraries:

nm mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql | cut -b20- >community.mysql nm mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql | cut -b20- >enterprise.mysql diff community.mysql enterprise.mysql | less nm mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqlbinlog | cut -b20- >community.mysqlbinlog nm mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqlbinlog | cut -b20- >enterprise.mysqlbinlog diff community.mysqlbinlog enterprise.mysqlbinlog | less nm mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqld | cut -b20- >community.mysqld nm mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqld | cut -b20- >enterprise.mysqld diff community.mysqld enterprise.mysqld | less nm mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqldump | cut -b20- >community.mysqldump nm mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysqldump | cut -b20- >enterprise.mysqldump diff community.mysqldump enterprise.mysqldump | less nm mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql_install_db | cut -b20- >community.mysql_install_db nm mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql_install_db | cut -b20- >enterprise.mysql_install_db diff community.mysql_install_db enterprise.mysql_install_db | less nm mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql_upgrade | cut -b20- >community.mysql_upgrade nm mysql-advanced-5.7.16-linux-glibc2.5-x86_64/bin/mysql_upgrade | cut -b20- >enterprise.mysql_upgrade diff community.mysql_upgrade enterprise.mysql_upgrade | less

Here are the files for your own research: mysql_community_and_enterprise_symbols.tar.gz

Some more details:

shell> grep zlib community.mysql enterprise.mysql community.mysql:zlibCompileFlags community.mysql:zlibVersion enterprise.mysql:COMP_zlib enterprise.mysql:COMP_zlib_cleanup enterprise.mysql:zlibCompileFlags enterprise.mysql:zlib_method_nozlib enterprise.mysql:zlibVersion shell> diff community.mysqld enterprise.mysqld | grep -i partit no differences shell> diff community.mysqld enterprise.mysqld | grep -i err_ < err_helper > ERR_add_error_data > ERR_add_error_vdata > ERR_clear_error > err_defaults > ERR_error_string > ERR_error_string_n > err_fns > ERR_free_strings > ERR_func_error_string > ERR_get_error > ERR_get_error_line > ERR_get_error_line_data > ERR_get_err_state_table > ERR_get_implementation > ERR_get_next_error_library > ERR_get_state > ERR_get_string_table > ERR_lib_error_string > ERR_load_ASN1_strings > ERR_load_BIO_strings > ERR_load_BN_strings > ERR_load_BUF_strings > ERR_load_CMS_strings > ERR_load_COMP_strings > ERR_load_CONF_strings > ERR_load_crypto_strings > ERR_load_CRYPTO_strings > ERR_load_DH_strings > ERR_load_DSA_strings > ERR_load_DSO_strings > ERR_load_ECDH_strings > ERR_load_ECDSA_strings > ERR_load_EC_strings > ERR_load_ENGINE_strings > ERR_load_ERR_strings > ERR_load_EVP_strings > ERR_load_OBJ_strings > ERR_load_OCSP_strings > ERR_load_PEM_strings > ERR_load_PKCS12_strings > ERR_load_PKCS7_strings > ERR_load_RAND_strings > ERR_load_RSA_strings > ERR_load_SSL_strings > ERR_load_strings > ERR_load_TS_strings > ERR_load_UI_strings > ERR_load_X509_strings > ERR_load_X509V3_strings > ERR_peek_error > ERR_peek_error_line > ERR_peek_error_line_data > ERR_peek_last_error > ERR_peek_last_error_line > ERR_peek_last_error_line_data > ERR_pop_to_mark > ERR_print_errors > ERR_print_errors_cb > ERR_print_errors_fp > ERR_put_error > ERR_reason_error_string > ERR_release_err_state_table > ERR_remove_state > ERR_remove_thread_state > ERR_set_error_data > ERR_set_implementation > ERR_set_mark > err_state_LHASH_COMP > err_state_LHASH_HASH > ERR_str_functs > err_string_data_LHASH_COMP > err_string_data_LHASH_HASH > ERR_str_libraries > ERR_str_reasons > ERR_unload_strings > int_err_del > int_err_del_item > int_err_get > int_err_get_item > int_err_get_next_lib > int_err_library_number > int_err_set_item < yaERR_error_string < yaERR_error_string_n < yaERR_free_strings < yaERR_get_error < yaERR_get_error_line_data < yaERR_GET_REASON < yaERR_peek_error < yaERR_print_errors_fp < yaERR_remove_state < _ZZ18yaERR_error_stringE3msg
MySQL Enterprise Server and MySQL Community Server packages

This is not directly MySQL Server related but it affects operation as well: We found today that the MySQL Enterprise Server RPM package and the MySQL Community Server packages were not prepared the same. The MySQL Enterprise Server for MySQL 5.7.15 package was still using sysV init scripts whereas the MySQL 5.7.15 Community Server package seems to use already SystermD unit files (since MySQL 5.7.6: Managing MySQL Server with systemd). This has change from MySQL 5.7.15 to MySQL 5.7.16 Enterprise Server. So if you side-grade from MySQL Community to MySQL Enterprise Server you might experience some surprises...

Taxonomy upgrade extras: mysql servermysql community servermysql enterprise serverenterprise

How to build your own RPM repository for MySQL Enterprise Server 5.7 on RHEL 7

Shinguz - Mon, 2016-10-24 23:01
Prepare the RPM repository server

Install the software to create a RPM repository server (on an Ubuntu web server):

shell> sudo apt-get install createrepo

Create the directory structures and initialize the repositories:

shell> sudo mkdir -p /var/www/html/repos/centos/7/os/x86_64 shell> sudo createrepo /var/www/html/repos/centos/7/os/x86_64/

Copy the MySQL Enterprise RPM packages to the repository:

shell> sudo cd /var/www/html/repos/centos/7/os/x86_64/ shell> sudo unzip -v /download/V790254-01.zip # MySQL Enterprise Server 5.7.16 Archive: /download/V790254-01.zip Length Method Size Cmpr Date Time CRC-32 Name --------- ------ -------- ---- ---------- ----- -------- ---- 23979568 Stored 23979568 0% 2016-09-29 16:56 ae6693b1 mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm 45327096 Stored 45327096 0% 2016-09-29 16:56 bb83c965 mysql-commercial-embedded-5.7.16-1.1.el7.x86_64.rpm 271300 Stored 271300 0% 2016-09-29 16:56 b4eebc96 mysql-commercial-common-5.7.16-1.1.el7.x86_64.rpm 2041404 Stored 2041404 0% 2016-09-29 16:57 cfc63d84 mysql-commercial-libs-compat-5.7.16-1.1.el7.x86_64.rpm 23747244 Stored 23747244 0% 2016-09-29 16:56 7b4d36fa mysql-commercial-embedded-compat-5.7.16-1.1.el7.x86_64.rpm 3644756 Stored 3644756 0% 2016-09-29 16:56 613af6a3 mysql-commercial-devel-5.7.16-1.1.el7.x86_64.rpm 170697184 Stored 170697184 0% 2016-09-29 16:57 ce26e84a mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm 116778644 Stored 116778644 0% 2016-09-29 16:58 8ca7f0f0 mysql-commercial-test-5.7.16-1.1.el7.x86_64.rpm 125679224 Stored 125679224 0% 2016-09-29 16:57 e74a416d mysql-commercial-embedded-devel-5.7.16-1.1.el7.x86_64.rpm 2172140 Stored 2172140 0% 2016-09-29 16:57 e2a1c2f9 mysql-commercial-libs-5.7.16-1.1.el7.x86_64.rpm 3018 Stored 3018 0% 2016-10-11 13:00 6d6efc1e README.txt --------- --------- ---- ------- 514341578 514341578 0% 11 files

Update the RPM repository meta data:

shell> sudo createrepo --update /var/www/html/repos/centos/7/os/x86_64/

Now the RPM repository server is finished.

Prepare the RPM client

Create the MySQL Enterprise Server repository file for the client. The IP address represents the IP address of your RPM repository server:

# # /etc/yum.repos.d/mysql-enterprise.repo # [mysql57-enterprise] name=MySQL 5.7 Enterprise Server baseurl=http://192.168.56.1/repos/centos/$releasever/os/$basearch/ gpgcheck=1 enabled=1 gpgkey=http://192.168.56.1/repos/centos/RPM-GPG-KEY-CentOS-7

Clean up the yum cache:

shell> yum clean all Loaded plugins: fastestmirror Cleaning repos: base extras mysql57-enterprise updates Cleaning up everything

Show all know RPM repositories:

shell> yum repolist Loaded plugins: fastestmirror base | 3.6 kB 00:00:00 extras | 3.4 kB 00:00:00 mysql57-enterprise | 2.9 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/5): mysql57-enterprise/7/x86_64/primary_db | 12 kB 00:00:00 (2/5): base/7/x86_64/group_gz | 155 kB 00:00:00 (3/5): extras/7/x86_64/primary_db | 166 kB 00:00:00 (4/5): base/7/x86_64/primary_db | 5.3 MB 00:00:06 (5/5): updates/7/x86_64/primary_db | 8.4 MB 00:00:11 Determining fastest mirrors * base: mirror.imt-systems.com * extras: mirror.eu.oneandone.net * updates: mirror.rackspeed.de repo id repo name status base/7/x86_64 CentOS-7 - Base 9'007 extras/7/x86_64 CentOS-7 - Extras 393 mysql57-enterprise/7/x86_64 MySQL 5.7 Enterprise Server 10 updates/7/x86_64 CentOS-7 - Updates 2'548 repolist: 11'958

Search what MySQL Enterprise Server packages are available:

shell> yum search mysql-commercial Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.imt-systems.com * extras: mirror.eu.oneandone.net * updates: mirror.rackspeed.de ============================================================================= N/S matched: mysql-commercial ============================================================================== mysql-commercial-client.x86_64 : MySQL database client applications and tools mysql-commercial-common.x86_64 : MySQL database common files for server and client libs mysql-commercial-devel.x86_64 : Development header files and libraries for MySQL database client applications mysql-commercial-embedded.x86_64 : MySQL embedded library mysql-commercial-embedded-compat.x86_64 : MySQL embedded compat library mysql-commercial-embedded-devel.x86_64 : Development header files and libraries for MySQL as an embeddable library mysql-commercial-libs.x86_64 : Shared libraries for MySQL database client applications mysql-commercial-libs-compat.x86_64 : Shared compat libraries for MySQL 5.6.31 database client applications mysql-commercial-server.x86_64 : A very fast and reliable SQL database server mysql-commercial-test.x86_64 : Test suite for the MySQL database server Name and summary matches only, use "search all" for everything.

Now you are ready to install your MySQL Enterprise Server RPM packages:

shell> yum install mysql-commercial-server Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.imt-systems.com * extras: mirror.eu.oneandone.net * updates: mirror.rackspeed.de Resolving Dependencies --> Running transaction check ---> Package mysql-commercial-server.x86_64 0:5.7.16-1.1.el7 will be installed --> Processing Dependency: mysql-commercial-client(x86-64) >= 5.7.9 for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(Getopt::Long) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: /usr/bin/perl for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(strict) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: net-tools for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1()(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Running transaction check ---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed ---> Package mysql-commercial-client.x86_64 0:5.7.16-1.1.el7 will be installed ---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed ---> Package perl.x86_64 4:5.16.3-286.el7 will be installed --> Processing Dependency: perl-libs = 4:5.16.3-286.el7 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-macros for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-libs for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Exporter) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.16.3-286.el7.x86_64 ---> Package perl-Getopt-Long.noarch 0:2.40-2.el7 will be installed --> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-2.el7.noarch --> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-2.el7.noarch --> Running transaction check ---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed ---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed ---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed ---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed ---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed ---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed ---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed --> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch --> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch ---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed --> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch --> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch ---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed ---> Package perl-Socket.x86_64 0:2.010-3.el7 will be installed ---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed ---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed ---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed ---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed ---> Package perl-constant.noarch 0:1.27-2.el7 will be installed ---> Package perl-libs.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-macros.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed ---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed --> Running transaction check ---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed ---> Package perl-Pod-Escapes.noarch 1:1.04-286.el7 will be installed ---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed --> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch --> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch ---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed --> Running transaction check ---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed ---> Package perl-parent.noarch 1:0.225-244.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================================================== Installing: mysql-commercial-server x86_64 5.7.16-1.1.el7 mysql57-enterprise 163 M Installing for dependencies: libaio x86_64 0.3.109-13.el7 base 24 k mysql-commercial-client x86_64 5.7.16-1.1.el7 mysql57-enterprise 23 M net-tools x86_64 2.0-0.17.20131004git.el7 base 304 k perl x86_64 4:5.16.3-286.el7 base 8.0 M perl-Carp noarch 1.26-244.el7 base 19 k perl-Encode x86_64 2.51-7.el7 base 1.5 M perl-Exporter noarch 5.68-3.el7 base 28 k perl-File-Path noarch 2.09-2.el7 base 26 k perl-File-Temp noarch 0.23.01-3.el7 base 56 k perl-Filter x86_64 1.49-3.el7 base 76 k perl-Getopt-Long noarch 2.40-2.el7 base 56 k perl-HTTP-Tiny noarch 0.033-3.el7 base 38 k perl-PathTools x86_64 3.40-5.el7 base 82 k perl-Pod-Escapes noarch 1:1.04-286.el7 base 50 k perl-Pod-Perldoc noarch 3.20-4.el7 base 87 k perl-Pod-Simple noarch 1:3.28-4.el7 base 216 k perl-Pod-Usage noarch 1.63-3.el7 base 27 k perl-Scalar-List-Utils x86_64 1.27-248.el7 base 36 k perl-Socket x86_64 2.010-3.el7 base 49 k perl-Storable x86_64 2.45-3.el7 base 77 k perl-Text-ParseWords noarch 3.29-4.el7 base 14 k perl-Time-HiRes x86_64 4:1.9725-3.el7 base 45 k perl-Time-Local noarch 1.2300-2.el7 base 24 k perl-constant noarch 1.27-2.el7 base 19 k perl-libs x86_64 4:5.16.3-286.el7 base 687 k perl-macros x86_64 4:5.16.3-286.el7 base 43 k perl-parent noarch 1:0.225-244.el7 base 12 k perl-podlators noarch 2.5.1-3.el7 base 112 k perl-threads x86_64 1.87-4.el7 base 49 k perl-threads-shared x86_64 1.43-6.el7 base 39 k Transaction Summary ========================================================================================================================================================================================== Install 1 Package (+30 Dependent packages) Total download size: 197 M Installed size: 852 M Is this ok [y/d/N]: y
Further sources of information: Taxonomy upgrade extras: rpmrepositorymysqlmysql enterprise serverenterpriserhelred hat

How to build your own RPM repository for MySQL Enterprise Server 5.7 on RHEL 7

Shinguz - Mon, 2016-10-24 23:01
Prepare the RPM repository server

Install the software to create a RPM repository server (on an Ubuntu web server):

shell> sudo apt-get install createrepo

Create the directory structures and initialize the repositories:

shell> sudo mkdir -p /var/www/html/repos/centos/7/os/x86_64 shell> sudo createrepo /var/www/html/repos/centos/7/os/x86_64/

Copy the MySQL Enterprise RPM packages to the repository:

shell> sudo cd /var/www/html/repos/centos/7/os/x86_64/ shell> sudo unzip -v /download/V790254-01.zip # MySQL Enterprise Server 5.7.16 Archive: /download/V790254-01.zip Length Method Size Cmpr Date Time CRC-32 Name --------- ------ -------- ---- ---------- ----- -------- ---- 23979568 Stored 23979568 0% 2016-09-29 16:56 ae6693b1 mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm 45327096 Stored 45327096 0% 2016-09-29 16:56 bb83c965 mysql-commercial-embedded-5.7.16-1.1.el7.x86_64.rpm 271300 Stored 271300 0% 2016-09-29 16:56 b4eebc96 mysql-commercial-common-5.7.16-1.1.el7.x86_64.rpm 2041404 Stored 2041404 0% 2016-09-29 16:57 cfc63d84 mysql-commercial-libs-compat-5.7.16-1.1.el7.x86_64.rpm 23747244 Stored 23747244 0% 2016-09-29 16:56 7b4d36fa mysql-commercial-embedded-compat-5.7.16-1.1.el7.x86_64.rpm 3644756 Stored 3644756 0% 2016-09-29 16:56 613af6a3 mysql-commercial-devel-5.7.16-1.1.el7.x86_64.rpm 170697184 Stored 170697184 0% 2016-09-29 16:57 ce26e84a mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm 116778644 Stored 116778644 0% 2016-09-29 16:58 8ca7f0f0 mysql-commercial-test-5.7.16-1.1.el7.x86_64.rpm 125679224 Stored 125679224 0% 2016-09-29 16:57 e74a416d mysql-commercial-embedded-devel-5.7.16-1.1.el7.x86_64.rpm 2172140 Stored 2172140 0% 2016-09-29 16:57 e2a1c2f9 mysql-commercial-libs-5.7.16-1.1.el7.x86_64.rpm 3018 Stored 3018 0% 2016-10-11 13:00 6d6efc1e README.txt --------- --------- ---- ------- 514341578 514341578 0% 11 files

Update the RPM repository meta data:

shell> sudo createrepo --update /var/www/html/repos/centos/7/os/x86_64/

Now the RPM repository server is finished.

Prepare the RPM client

Create the MySQL Enterprise Server repository file for the client. The IP address represents the IP address of your RPM repository server:

# # /etc/yum.repos.d/mysql-enterprise.repo # [mysql57-enterprise] name=MySQL 5.7 Enterprise Server baseurl=http://192.168.56.1/repos/centos/$releasever/os/$basearch/ gpgcheck=1 enabled=1 gpgkey=http://192.168.56.1/repos/centos/RPM-GPG-KEY-CentOS-7

Clean up the yum cache:

shell> yum clean all Loaded plugins: fastestmirror Cleaning repos: base extras mysql57-enterprise updates Cleaning up everything

Show all know RPM repositories:

shell> yum repolist Loaded plugins: fastestmirror base | 3.6 kB 00:00:00 extras | 3.4 kB 00:00:00 mysql57-enterprise | 2.9 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/5): mysql57-enterprise/7/x86_64/primary_db | 12 kB 00:00:00 (2/5): base/7/x86_64/group_gz | 155 kB 00:00:00 (3/5): extras/7/x86_64/primary_db | 166 kB 00:00:00 (4/5): base/7/x86_64/primary_db | 5.3 MB 00:00:06 (5/5): updates/7/x86_64/primary_db | 8.4 MB 00:00:11 Determining fastest mirrors * base: mirror.imt-systems.com * extras: mirror.eu.oneandone.net * updates: mirror.rackspeed.de repo id repo name status base/7/x86_64 CentOS-7 - Base 9'007 extras/7/x86_64 CentOS-7 - Extras 393 mysql57-enterprise/7/x86_64 MySQL 5.7 Enterprise Server 10 updates/7/x86_64 CentOS-7 - Updates 2'548 repolist: 11'958

Search what MySQL Enterprise Server packages are available:

shell> yum search mysql-commercial Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.imt-systems.com * extras: mirror.eu.oneandone.net * updates: mirror.rackspeed.de ============================================================================= N/S matched: mysql-commercial ============================================================================== mysql-commercial-client.x86_64 : MySQL database client applications and tools mysql-commercial-common.x86_64 : MySQL database common files for server and client libs mysql-commercial-devel.x86_64 : Development header files and libraries for MySQL database client applications mysql-commercial-embedded.x86_64 : MySQL embedded library mysql-commercial-embedded-compat.x86_64 : MySQL embedded compat library mysql-commercial-embedded-devel.x86_64 : Development header files and libraries for MySQL as an embeddable library mysql-commercial-libs.x86_64 : Shared libraries for MySQL database client applications mysql-commercial-libs-compat.x86_64 : Shared compat libraries for MySQL 5.6.31 database client applications mysql-commercial-server.x86_64 : A very fast and reliable SQL database server mysql-commercial-test.x86_64 : Test suite for the MySQL database server Name and summary matches only, use "search all" for everything.

Now you are ready to install your MySQL Enterprise Server RPM packages:

shell> yum install mysql-commercial-server Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.imt-systems.com * extras: mirror.eu.oneandone.net * updates: mirror.rackspeed.de Resolving Dependencies --> Running transaction check ---> Package mysql-commercial-server.x86_64 0:5.7.16-1.1.el7 will be installed --> Processing Dependency: mysql-commercial-client(x86-64) >= 5.7.9 for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(Getopt::Long) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: /usr/bin/perl for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(strict) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: net-tools for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1()(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Running transaction check ---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed ---> Package mysql-commercial-client.x86_64 0:5.7.16-1.1.el7 will be installed ---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed ---> Package perl.x86_64 4:5.16.3-286.el7 will be installed --> Processing Dependency: perl-libs = 4:5.16.3-286.el7 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-macros for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-libs for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Exporter) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.16.3-286.el7.x86_64 ---> Package perl-Getopt-Long.noarch 0:2.40-2.el7 will be installed --> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-2.el7.noarch --> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-2.el7.noarch --> Running transaction check ---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed ---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed ---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed ---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed ---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed ---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed ---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed --> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch --> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch ---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed --> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch --> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch ---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed ---> Package perl-Socket.x86_64 0:2.010-3.el7 will be installed ---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed ---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed ---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed ---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed ---> Package perl-constant.noarch 0:1.27-2.el7 will be installed ---> Package perl-libs.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-macros.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed ---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed --> Running transaction check ---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed ---> Package perl-Pod-Escapes.noarch 1:1.04-286.el7 will be installed ---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed --> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch --> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch ---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed --> Running transaction check ---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed ---> Package perl-parent.noarch 1:0.225-244.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================================================== Installing: mysql-commercial-server x86_64 5.7.16-1.1.el7 mysql57-enterprise 163 M Installing for dependencies: libaio x86_64 0.3.109-13.el7 base 24 k mysql-commercial-client x86_64 5.7.16-1.1.el7 mysql57-enterprise 23 M net-tools x86_64 2.0-0.17.20131004git.el7 base 304 k perl x86_64 4:5.16.3-286.el7 base 8.0 M perl-Carp noarch 1.26-244.el7 base 19 k perl-Encode x86_64 2.51-7.el7 base 1.5 M perl-Exporter noarch 5.68-3.el7 base 28 k perl-File-Path noarch 2.09-2.el7 base 26 k perl-File-Temp noarch 0.23.01-3.el7 base 56 k perl-Filter x86_64 1.49-3.el7 base 76 k perl-Getopt-Long noarch 2.40-2.el7 base 56 k perl-HTTP-Tiny noarch 0.033-3.el7 base 38 k perl-PathTools x86_64 3.40-5.el7 base 82 k perl-Pod-Escapes noarch 1:1.04-286.el7 base 50 k perl-Pod-Perldoc noarch 3.20-4.el7 base 87 k perl-Pod-Simple noarch 1:3.28-4.el7 base 216 k perl-Pod-Usage noarch 1.63-3.el7 base 27 k perl-Scalar-List-Utils x86_64 1.27-248.el7 base 36 k perl-Socket x86_64 2.010-3.el7 base 49 k perl-Storable x86_64 2.45-3.el7 base 77 k perl-Text-ParseWords noarch 3.29-4.el7 base 14 k perl-Time-HiRes x86_64 4:1.9725-3.el7 base 45 k perl-Time-Local noarch 1.2300-2.el7 base 24 k perl-constant noarch 1.27-2.el7 base 19 k perl-libs x86_64 4:5.16.3-286.el7 base 687 k perl-macros x86_64 4:5.16.3-286.el7 base 43 k perl-parent noarch 1:0.225-244.el7 base 12 k perl-podlators noarch 2.5.1-3.el7 base 112 k perl-threads x86_64 1.87-4.el7 base 49 k perl-threads-shared x86_64 1.43-6.el7 base 39 k Transaction Summary ========================================================================================================================================================================================== Install 1 Package (+30 Dependent packages) Total download size: 197 M Installed size: 852 M Is this ok [y/d/N]: y
Further sources of information: Taxonomy upgrade extras: rpmrepositorymysqlmysql enterprise serverenterpriserhelred hat

How to Install MySQL Enterprise Server 5.7 on Red Hat Enterprise Linux 7

Shinguz - Mon, 2016-10-24 22:03

If you have already Red Hat Enterprise Linux 7 (RHEL 7) or CentOS 7 in use you probably found out, that it is not that easy to install MySQL Enterprise Server because there are already pre-installed MariaDB 5.5 libraries:

shell> yum localinstall mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm mysql-commercial-libs-5.7.16-1.1.el7.x86_64.rpm mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm mysql-commercial-common-5.7.16-1.1.el7.x86_64.rpm Loaded plugins: fastestmirror Examining mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm: mysql-commercial-client-5.7.16-1.1.el7.x86_64 Marking mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm to be installed Examining mysql-commercial-libs-5.7.16-1.1.el7.x86_64.rpm: mysql-commercial-libs-5.7.16-1.1.el7.x86_64 Marking mysql-commercial-libs-5.7.16-1.1.el7.x86_64.rpm to be installed Examining mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm: mysql-commercial-server-5.7.16-1.1.el7.x86_64 Marking mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm to be installed Examining mysql-commercial-common-5.7.16-1.1.el7.x86_64.rpm: mysql-commercial-common-5.7.16-1.1.el7.x86_64 Marking mysql-commercial-common-5.7.16-1.1.el7.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be obsoleted --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 Loading mirror speeds from cached hostfile * base: wftp.tu-chemnitz.de * extras: wftp.tu-chemnitz.de * updates: mirror.rackspeed.de --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 ---> Package mysql-commercial-client.x86_64 0:5.7.16-1.1.el7 will be installed ---> Package mysql-commercial-common.x86_64 0:5.7.16-1.1.el7 will be installed ---> Package mysql-commercial-libs.x86_64 0:5.7.16-1.1.el7 will be obsoleting ---> Package mysql-commercial-server.x86_64 0:5.7.16-1.1.el7 will be installed --> Processing Dependency: /usr/bin/perl for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: net-tools for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(Getopt::Long) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(strict) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1()(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Running transaction check ---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed ---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be obsoleted --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 ---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed ---> Package perl.x86_64 4:5.16.3-286.el7 will be installed --> Processing Dependency: perl-libs = 4:5.16.3-286.el7 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-macros for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-libs for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Exporter) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.16.3-286.el7.x86_64 ---> Package perl-Getopt-Long.noarch 0:2.40-2.el7 will be installed --> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-2.el7.noarch --> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-2.el7.noarch --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be obsoleted --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 ---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed ---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed ---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed ---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed ---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed ---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed ---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed --> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch --> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch ---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed --> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch --> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch ---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed ---> Package perl-Socket.x86_64 0:2.010-3.el7 will be installed ---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed ---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed ---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed ---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed ---> Package perl-constant.noarch 0:1.27-2.el7 will be installed ---> Package perl-libs.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-macros.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed ---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be obsoleted --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 ---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed ---> Package perl-Pod-Escapes.noarch 1:1.04-286.el7 will be installed ---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed --> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch --> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch ---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be obsoleted --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 ---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed ---> Package perl-parent.noarch 1:0.225-244.el7 will be installed --> Finished Dependency Resolution Error: Package: 2:postfix-2.10.1-6.el7.x86_64 (@anaconda) Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit) Removing: 1:mariadb-libs-5.5.50-1.el7_2.x86_64 (@updates) libmysqlclient.so.18(libmysqlclient_18)(64bit) Obsoleted By: mysql-commercial-libs-5.7.16-1.1.el7.x86_64 (/mysql-commercial-libs-5.7.16-1.1.el7.x86_64) Not found Available: 1:mariadb-libs-5.5.44-2.el7.centos.x86_64 (base) libmysqlclient.so.18(libmysqlclient_18)(64bit) Available: 1:mariadb-libs-5.5.47-1.el7_2.x86_64 (updates) libmysqlclient.so.18(libmysqlclient_18)(64bit) Error: Package: 2:postfix-2.10.1-6.el7.x86_64 (@anaconda) Requires: libmysqlclient.so.18()(64bit) Removing: 1:mariadb-libs-5.5.50-1.el7_2.x86_64 (@updates) libmysqlclient.so.18()(64bit) Obsoleted By: mysql-commercial-libs-5.7.16-1.1.el7.x86_64 (/mysql-commercial-libs-5.7.16-1.1.el7.x86_64) ~libmysqlclient.so.20()(64bit) Available: 1:mariadb-libs-5.5.44-2.el7.centos.x86_64 (base) libmysqlclient.so.18()(64bit) Available: 1:mariadb-libs-5.5.47-1.el7_2.x86_64 (updates) libmysqlclient.so.18()(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

You can remove postfix and mariadb-libs but this will most probably cause you troubles sooner or later:

shell> yum remove postfix mariadb-libs Loaded plugins: fastestmirror Resolving Dependencies --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be erased ---> Package postfix.x86_64 2:2.10.1-6.el7 will be erased --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================================================== Removing: mariadb-libs x86_64 1:5.5.50-1.el7_2 @updates 4.4 M postfix x86_64 2:2.10.1-6.el7 @anaconda 12 M Transaction Summary ========================================================================================================================================================================================== Remove 2 Packages Installed size: 17 M Is this ok [y/N]: n

If you look at the MySQL Installation Guide: Installing MySQL on Linux Using RPM Packages from Oracle it is unfortunately not really very well documented how to install MySQL Enterprise Server: "using rpm -Uvh instead makes the installation process more prone to failure, due to potential dependency issues the installation process might run into".

So the correct way to install MySQL Enterprise Server 5.7 on Red Hat Enterprise Linux 7 (RHEL7) or CentOS 7 is as follows:

shell> rpm --upgrade -vh mysql-commercial-libs-compat-5.7.16-1.1.el7.x86_64.rpm mysql-commercial-libs-5.7.16-1.1.el7.x86_64.rpm mysql-commercial-common-5.7.16-1.1.el7.x86_64.rpm shell> yum localinstall mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm Loaded plugins: fastestmirror Examining mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm: mysql-commercial-server-5.7.16-1.1.el7.x86_64 Marking mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm to be installed Examining mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm: mysql-commercial-client-5.7.16-1.1.el7.x86_64 Marking mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package mysql-commercial-client.x86_64 0:5.7.16-1.1.el7 will be installed ---> Package mysql-commercial-server.x86_64 0:5.7.16-1.1.el7 will be installed --> Processing Dependency: /usr/bin/perl for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 Loading mirror speeds from cached hostfile * base: wftp.tu-chemnitz.de * extras: wftp.tu-chemnitz.de * updates: mirror.rackspeed.de --> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: net-tools for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(Getopt::Long) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(strict) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1()(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Running transaction check ---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed ---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed ---> Package perl.x86_64 4:5.16.3-286.el7 will be installed --> Processing Dependency: perl-libs = 4:5.16.3-286.el7 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-macros for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-libs for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Exporter) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.16.3-286.el7.x86_64 ---> Package perl-Getopt-Long.noarch 0:2.40-2.el7 will be installed --> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-2.el7.noarch --> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-2.el7.noarch --> Running transaction check ---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed ---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed ---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed ---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed ---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed ---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed ---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed --> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch --> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch ---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed --> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch --> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch ---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed ---> Package perl-Socket.x86_64 0:2.010-3.el7 will be installed ---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed ---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed ---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed ---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed ---> Package perl-constant.noarch 0:1.27-2.el7 will be installed ---> Package perl-libs.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-macros.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed ---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed --> Running transaction check ---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed ---> Package perl-Pod-Escapes.noarch 1:1.04-286.el7 will be installed ---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed --> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch --> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch ---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed --> Running transaction check ---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed ---> Package perl-parent.noarch 1:0.225-244.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================================================== Installing: mysql-commercial-client x86_64 5.7.16-1.1.el7 /mysql-commercial-client-5.7.16-1.1.el7.x86_64 94 M mysql-commercial-server x86_64 5.7.16-1.1.el7 /mysql-commercial-server-5.7.16-1.1.el7.x86_64 721 M Installing for dependencies: libaio x86_64 0.3.109-13.el7 base 24 k net-tools x86_64 2.0-0.17.20131004git.el7 base 304 k perl x86_64 4:5.16.3-286.el7 base 8.0 M perl-Carp noarch 1.26-244.el7 base 19 k perl-Encode x86_64 2.51-7.el7 base 1.5 M perl-Exporter noarch 5.68-3.el7 base 28 k perl-File-Path noarch 2.09-2.el7 base 26 k perl-File-Temp noarch 0.23.01-3.el7 base 56 k perl-Filter x86_64 1.49-3.el7 base 76 k perl-Getopt-Long noarch 2.40-2.el7 base 56 k perl-HTTP-Tiny noarch 0.033-3.el7 base 38 k perl-PathTools x86_64 3.40-5.el7 base 82 k perl-Pod-Escapes noarch 1:1.04-286.el7 base 50 k perl-Pod-Perldoc noarch 3.20-4.el7 base 87 k perl-Pod-Simple noarch 1:3.28-4.el7 base 216 k perl-Pod-Usage noarch 1.63-3.el7 base 27 k perl-Scalar-List-Utils x86_64 1.27-248.el7 base 36 k perl-Socket x86_64 2.010-3.el7 base 49 k perl-Storable x86_64 2.45-3.el7 base 77 k perl-Text-ParseWords noarch 3.29-4.el7 base 14 k perl-Time-HiRes x86_64 4:1.9725-3.el7 base 45 k perl-Time-Local noarch 1.2300-2.el7 base 24 k perl-constant noarch 1.27-2.el7 base 19 k perl-libs x86_64 4:5.16.3-286.el7 base 687 k perl-macros x86_64 4:5.16.3-286.el7 base 43 k perl-parent noarch 1:0.225-244.el7 base 12 k perl-podlators noarch 2.5.1-3.el7 base 112 k perl-threads x86_64 1.87-4.el7 base 49 k perl-threads-shared x86_64 1.43-6.el7 base 39 k Transaction Summary ========================================================================================================================================================================================== Install 2 Packages (+29 Dependent packages) Total size: 826 M Total download size: 12 M Installed size: 852 M Is this ok [y/d/N]: y

Further information you can find in the slides of my colleague Jörg Brühe: MySQL selection also against the distirbution he presented at FrOSCon 2016.

Taxonomy upgrade extras: installationinstallmysqlenterpriserhelred hatcentosmariadbserver

How to Install MySQL Enterprise Server 5.7 on Red Hat Enterprise Linux 7

Shinguz - Mon, 2016-10-24 22:03

If you have already Red Hat Enterprise Linux 7 (RHEL 7) or CentOS 7 in use you probably found out, that it is not that easy to install MySQL Enterprise Server because there are already pre-installed MariaDB 5.5 libraries:

shell> yum localinstall mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm mysql-commercial-libs-5.7.16-1.1.el7.x86_64.rpm mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm mysql-commercial-common-5.7.16-1.1.el7.x86_64.rpm Loaded plugins: fastestmirror Examining mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm: mysql-commercial-client-5.7.16-1.1.el7.x86_64 Marking mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm to be installed Examining mysql-commercial-libs-5.7.16-1.1.el7.x86_64.rpm: mysql-commercial-libs-5.7.16-1.1.el7.x86_64 Marking mysql-commercial-libs-5.7.16-1.1.el7.x86_64.rpm to be installed Examining mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm: mysql-commercial-server-5.7.16-1.1.el7.x86_64 Marking mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm to be installed Examining mysql-commercial-common-5.7.16-1.1.el7.x86_64.rpm: mysql-commercial-common-5.7.16-1.1.el7.x86_64 Marking mysql-commercial-common-5.7.16-1.1.el7.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be obsoleted --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 Loading mirror speeds from cached hostfile * base: wftp.tu-chemnitz.de * extras: wftp.tu-chemnitz.de * updates: mirror.rackspeed.de --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 ---> Package mysql-commercial-client.x86_64 0:5.7.16-1.1.el7 will be installed ---> Package mysql-commercial-common.x86_64 0:5.7.16-1.1.el7 will be installed ---> Package mysql-commercial-libs.x86_64 0:5.7.16-1.1.el7 will be obsoleting ---> Package mysql-commercial-server.x86_64 0:5.7.16-1.1.el7 will be installed --> Processing Dependency: /usr/bin/perl for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: net-tools for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(Getopt::Long) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(strict) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1()(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Running transaction check ---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed ---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be obsoleted --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 ---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed ---> Package perl.x86_64 4:5.16.3-286.el7 will be installed --> Processing Dependency: perl-libs = 4:5.16.3-286.el7 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-macros for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-libs for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Exporter) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.16.3-286.el7.x86_64 ---> Package perl-Getopt-Long.noarch 0:2.40-2.el7 will be installed --> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-2.el7.noarch --> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-2.el7.noarch --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be obsoleted --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 ---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed ---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed ---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed ---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed ---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed ---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed ---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed --> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch --> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch ---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed --> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch --> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch ---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed ---> Package perl-Socket.x86_64 0:2.010-3.el7 will be installed ---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed ---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed ---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed ---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed ---> Package perl-constant.noarch 0:1.27-2.el7 will be installed ---> Package perl-libs.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-macros.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed ---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be obsoleted --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 ---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed ---> Package perl-Pod-Escapes.noarch 1:1.04-286.el7 will be installed ---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed --> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch --> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch ---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be obsoleted --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 ---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed ---> Package perl-parent.noarch 1:0.225-244.el7 will be installed --> Finished Dependency Resolution Error: Package: 2:postfix-2.10.1-6.el7.x86_64 (@anaconda) Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit) Removing: 1:mariadb-libs-5.5.50-1.el7_2.x86_64 (@updates) libmysqlclient.so.18(libmysqlclient_18)(64bit) Obsoleted By: mysql-commercial-libs-5.7.16-1.1.el7.x86_64 (/mysql-commercial-libs-5.7.16-1.1.el7.x86_64) Not found Available: 1:mariadb-libs-5.5.44-2.el7.centos.x86_64 (base) libmysqlclient.so.18(libmysqlclient_18)(64bit) Available: 1:mariadb-libs-5.5.47-1.el7_2.x86_64 (updates) libmysqlclient.so.18(libmysqlclient_18)(64bit) Error: Package: 2:postfix-2.10.1-6.el7.x86_64 (@anaconda) Requires: libmysqlclient.so.18()(64bit) Removing: 1:mariadb-libs-5.5.50-1.el7_2.x86_64 (@updates) libmysqlclient.so.18()(64bit) Obsoleted By: mysql-commercial-libs-5.7.16-1.1.el7.x86_64 (/mysql-commercial-libs-5.7.16-1.1.el7.x86_64) ~libmysqlclient.so.20()(64bit) Available: 1:mariadb-libs-5.5.44-2.el7.centos.x86_64 (base) libmysqlclient.so.18()(64bit) Available: 1:mariadb-libs-5.5.47-1.el7_2.x86_64 (updates) libmysqlclient.so.18()(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

You can remove postfix and mariadb-libs but this will most probably cause you troubles sooner or later:

shell> yum remove postfix mariadb-libs Loaded plugins: fastestmirror Resolving Dependencies --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.50-1.el7_2 will be erased ---> Package postfix.x86_64 2:2.10.1-6.el7 will be erased --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================================================== Removing: mariadb-libs x86_64 1:5.5.50-1.el7_2 @updates 4.4 M postfix x86_64 2:2.10.1-6.el7 @anaconda 12 M Transaction Summary ========================================================================================================================================================================================== Remove 2 Packages Installed size: 17 M Is this ok [y/N]: n

If you look at the MySQL Installation Guide: Installing MySQL on Linux Using RPM Packages from Oracle it is unfortunately not really very well documented how to install MySQL Enterprise Server: "using rpm -Uvh instead makes the installation process more prone to failure, due to potential dependency issues the installation process might run into".

So the correct way to install MySQL Enterprise Server 5.7 on Red Hat Enterprise Linux 7 (RHEL7) or CentOS 7 is as follows:

shell> rpm --upgrade mysql-commercial-libs-compat-5.7.16-1.1.el7.x86_64.rpm mysql-commercial-libs-5.7.16-1.1.el7.x86_64.rpm mysql-commercial-common-5.7.16-1.1.el7.x86_64.rpm shell> yum localinstall mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm Loaded plugins: fastestmirror Examining mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm: mysql-commercial-server-5.7.16-1.1.el7.x86_64 Marking mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm to be installed Examining mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm: mysql-commercial-client-5.7.16-1.1.el7.x86_64 Marking mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package mysql-commercial-client.x86_64 0:5.7.16-1.1.el7 will be installed ---> Package mysql-commercial-server.x86_64 0:5.7.16-1.1.el7 will be installed --> Processing Dependency: /usr/bin/perl for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 Loading mirror speeds from cached hostfile * base: wftp.tu-chemnitz.de * extras: wftp.tu-chemnitz.de * updates: mirror.rackspeed.de --> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: net-tools for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(Getopt::Long) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(strict) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1()(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Running transaction check ---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed ---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed ---> Package perl.x86_64 4:5.16.3-286.el7 will be installed --> Processing Dependency: perl-libs = 4:5.16.3-286.el7 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-macros for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-libs for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Exporter) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.16.3-286.el7.x86_64 ---> Package perl-Getopt-Long.noarch 0:2.40-2.el7 will be installed --> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-2.el7.noarch --> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-2.el7.noarch --> Running transaction check ---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed ---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed ---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed ---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed ---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed ---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed ---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed --> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch --> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch ---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed --> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch --> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch ---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed ---> Package perl-Socket.x86_64 0:2.010-3.el7 will be installed ---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed ---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed ---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed ---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed ---> Package perl-constant.noarch 0:1.27-2.el7 will be installed ---> Package perl-libs.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-macros.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed ---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed --> Running transaction check ---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed ---> Package perl-Pod-Escapes.noarch 1:1.04-286.el7 will be installed ---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed --> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch --> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch ---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed --> Running transaction check ---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed ---> Package perl-parent.noarch 1:0.225-244.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================================================== Installing: mysql-commercial-client x86_64 5.7.16-1.1.el7 /mysql-commercial-client-5.7.16-1.1.el7.x86_64 94 M mysql-commercial-server x86_64 5.7.16-1.1.el7 /mysql-commercial-server-5.7.16-1.1.el7.x86_64 721 M Installing for dependencies: libaio x86_64 0.3.109-13.el7 base 24 k net-tools x86_64 2.0-0.17.20131004git.el7 base 304 k perl x86_64 4:5.16.3-286.el7 base 8.0 M perl-Carp noarch 1.26-244.el7 base 19 k perl-Encode x86_64 2.51-7.el7 base 1.5 M perl-Exporter noarch 5.68-3.el7 base 28 k perl-File-Path noarch 2.09-2.el7 base 26 k perl-File-Temp noarch 0.23.01-3.el7 base 56 k perl-Filter x86_64 1.49-3.el7 base 76 k perl-Getopt-Long noarch 2.40-2.el7 base 56 k perl-HTTP-Tiny noarch 0.033-3.el7 base 38 k perl-PathTools x86_64 3.40-5.el7 base 82 k perl-Pod-Escapes noarch 1:1.04-286.el7 base 50 k perl-Pod-Perldoc noarch 3.20-4.el7 base 87 k perl-Pod-Simple noarch 1:3.28-4.el7 base 216 k perl-Pod-Usage noarch 1.63-3.el7 base 27 k perl-Scalar-List-Utils x86_64 1.27-248.el7 base 36 k perl-Socket x86_64 2.010-3.el7 base 49 k perl-Storable x86_64 2.45-3.el7 base 77 k perl-Text-ParseWords noarch 3.29-4.el7 base 14 k perl-Time-HiRes x86_64 4:1.9725-3.el7 base 45 k perl-Time-Local noarch 1.2300-2.el7 base 24 k perl-constant noarch 1.27-2.el7 base 19 k perl-libs x86_64 4:5.16.3-286.el7 base 687 k perl-macros x86_64 4:5.16.3-286.el7 base 43 k perl-parent noarch 1:0.225-244.el7 base 12 k perl-podlators noarch 2.5.1-3.el7 base 112 k perl-threads x86_64 1.87-4.el7 base 49 k perl-threads-shared x86_64 1.43-6.el7 base 39 k Transaction Summary ========================================================================================================================================================================================== Install 2 Packages (+29 Dependent packages) Total size: 826 M Total download size: 12 M Installed size: 852 M Is this ok [y/d/N]: y

Further information you can find in the slides of my colleague Jörg Brühe: MySQL selection also against the distirbution he presented at FrOSCon 2016.

Taxonomy upgrade extras: installationinstallmysqlenterpriserhelred hatcentosmariadbserver

How to move InnoDB-Logfiles on a Galera Cluster

Cédric Bruderer - Wed, 2016-10-05 10:35

Somebody recently asked, what they had to do, if they wanted to move their InnoDB-Logfiles back to the datadir. As a challenge, the servers were part of a Galera Cluster.


My first thought was:

The problem is not the Galera Cluster itself, it is the rsync-SST (wsrep_sst_method = rsync) that could cause trouble and destroy your InnoDB-Logfiles, by simply overwriting or deleting them.


So I tried to confirm my thought and realised, I was wrong. This works anyway, because the node just takes the dataset from the other node. (The backup plan was ready now.)


Preferably, the cluster does an IST, where it only fetches the missing write sets. This way you do not have the danger of losing the InnoDB-Logfiles.


I will explain the way I would recommend:

First edit the my.cnf. The variable you have to change is innodb_log_group_home_dir. This variable contains the location of the log files. Set it to the new location of the logfiles.


After this is done, stop the MySQL server:

shell> service mysql stop - OR, for those who have systemd - shell> systemctl stop mysql

When the server is stopped, move the log files from the location they have been to their new location:

shell> mv /path/to/old/location/ibdata* /new/location/

After you made sure, they have been moved to the right place, you can start the MySQL-Server again.

shell> service mysql start - OR - shell> systemctl start mysql


If this goes wrong, you can force an SST by removing grastade.dat in the datadir. This will cause the node to fetch the dataset from a other node and return to work.

Taxonomy upgrade extras: Galera Clusterinnodb

How to move InnoDB-Logfiles on a Galera Cluster

Cédric Bruderer - Wed, 2016-10-05 10:35

Somebody recently asked, what they had to do, if they wanted to move their InnoDB-Logfiles back to the datadir. As a challenge, the servers were part of a Galera Cluster.


My first thought was:

The problem is not the Galera Cluster itself, it is the rsync-SST (wsrep_sst_method = rsync) that could cause trouble and destroy your InnoDB-Logfiles, by simply overwriting or deleting them.


So I tried to confirm my thought and realised, I was wrong. This works anyway, because the node just takes the dataset from the other node. (The backup plan was ready now.)


Preferably, the cluster does an IST, where it only fetches the missing write sets. This way you do not have the danger of losing the InnoDB-Logfiles.


I will explain the way I would recommend:

First edit the my.cnf. The variable you have to change is innodb_log_group_home_dir. This variable contains the location of the log files. Set it to the new location of the logfiles.


After this is done, stop the MySQL server:

shell> service mysql stop - OR, for those who have systemd - shell> systemctl stop mysql

When the server is stopped, move the log files from the location they have been to their new location:

shell> mv /path/to/old/location/ibdata* /new/location/

After you made sure, they have been moved to the right place, you can start the MySQL-Server again.

shell> service mysql start - OR - shell> systemctl start mysql


If this goes wrong, you can force an SST by removing grastade.dat in the datadir. This will cause the node to fetch the dataset from a other node and return to work.

Taxonomy upgrade extras: Galera Clusterinnodb

How to move InnoDB-Logfiles on a Galera Cluster

Cédric Bruderer - Wed, 2016-10-05 10:35

Somebody recently asked, what they had to do, if they wanted to move their InnoDB-Logfiles back to the datadir. As a challenge, the servers were part of a Galera Cluster.


My first thought was:

The problem is not the Galera Cluster itself, it is the rsync-SST (wsrep_sst_method = rsync) that could cause trouble and destroy your InnoDB-Logfiles, by simply overwriting or deleting them.


So I tried to confirm my thought and realised, I was wrong. This works anyway, because the node just takes the dataset from the other node. (The backup plan was ready now.)


Preferably, the cluster does an IST, where it only fetches the missing write sets. This way you do not have the danger of losing the InnoDB-Logfiles.


I will explain the way I would recommend:

First edit the my.cnf. The variable you have to change is innodb_log_group_home_dir. This variable contains the location of the log files. Set it to the new location of the logfiles.


After this is done, stop the MySQL server:

shell> service mysql stop - OR, for those who have systemd - shell> systemctl stop mysql

When the server is stopped, move the log files from the location they have been to their new location:

shell> mv /path/to/old/location/ibdata* /new/location/

After you made sure, they have been moved to the right place, you can start the MySQL-Server again.

shell> service mysql start - OR - shell> systemctl start mysql


If this goes wrong, you can force an SST by removing grastade.dat in the datadir. This will cause the node to fetch the dataset from a other node and return to work.

Taxonomy upgrade extras: Galera Clusterinnodb

Beware of large MySQL max_sort_length parameter

Shinguz - Wed, 2016-08-24 23:40

Today we had a very interesting phenomena at a customer. He complained that MySQL always get some errors of the following type:

[ERROR] mysqld: Sort aborted: Error writing file '/tmp/MYGbBrpA' (Errcode: 28 - No space left on device)

After a first investigation we found that df -h /tmp shows from time to time a full disk but we could not see any file with ls -la /tmp/MY*.

After some more investigation we found even the query from the Slow Query Log which was producing the same problem. It looked similar to this query:

SELECT * FROM test ORDER BY field5, field4, field3, field2, field1;

Now we were capable to simulate the problem at will with the following table:

CREATE TABLE `test` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `data` varchar(64) DEFAULT NULL, `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `field1` varchar(16) DEFAULT NULL, `field2` varchar(16) DEFAULT NULL, `field3` varchar(255) DEFAULT NULL, `field4` varchar(255) DEFAULT NULL, `field5` varchar(32) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=8912746 DEFAULT CHARSET=utf8 ;

An we have seen the query in SHOW PROCESSLIST:

| Query | 26 | Creating sort index | select * from test order by field5, field4, field3, field2, field1 |

But we were still not capable to see who or better how the hell mysqld is filling our disk!

I remembered further that I have seen some strange settings in the my.cnf before when we did the review of the database configuration. But I ignored them somehow.

[mysqld] max_sort_length = 8M sort_buffer_size = 20M

Now I remembered again these settings. We changed max_sort_length back to default 1k and suddenly our space problems disappeared!

We played a bit around with different values of max_sort_length and got the following execution times for our query:

max_sort_lengthexecution time [s]comment 64 8.8 s128 8.2 s256 9.3 s512 11.8 s 1k 14.9 s 2k 20.0 s 8k129.0 s 8M 75.0 sdisk full (50 G)
Conclusion

We set the values of max_sort_length back to the defaults. Our problems disappeared and we got working and much faster SELECT queries.

Do not needlessly change default values of MySQL without proving the impact. It can become worse than before!!!

The default value of max_sort_length is a good compromise between performance and an appropriate sort length.

Addendum

What I really did not like on this solution was, that I did not understand the way the problem occurred. So I did some more investigation in this. We were discussing forth and back if this could be because of XFS, because of sparse files or some kind of memory mapped files (see also man mmap).

At the end I had the idea to look at the lsof command during my running query:

mysql> SELECT * FROM test ORDER BY field5, field4, field3, field2, field1; ERROR 3 (HY000): Error writing file '/tmp/MYBuWcXP' (Errcode: 28 - No space left on device) shell> lsof -p 14733 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME mysqld 14733 mysql 32u REG 8,18 9705619456 30147474 /tmp/MYck8vf4 (deleted) mysqld 14733 mysql 49u REG 8,18 749797376 30147596 /tmp/MYBuWcXP (deleted)

So it looks like that there were some deleted files which were growing!

Further information from the IRC channel led me to the libc temporary files (see also man 3 tmpfile).

And some hints from MadMerlin|work pointed me to:

shell> ls /proc//fd

Where you can also see those temporary files.

Thanks to MadMerlin|work for the hints!

Taxonomy upgrade extras: sortfileorder by

Beware of large MySQL max_sort_length parameter

Shinguz - Wed, 2016-08-24 23:40

Today we had a very interesting phenomena at a customer. He complained that MySQL always get some errors of the following type:

[ERROR] mysqld: Sort aborted: Error writing file '/tmp/MYGbBrpA' (Errcode: 28 - No space left on device)

After a first investigation we found that df -h /tmp shows from time to time a full disk but we could not see any file with ls -la /tmp/MY*.

After some more investigation we found even the query from the Slow Query Log which was producing the same problem. It looked similar to this query:

SELECT * FROM test ORDER BY field5, field4, field3, field2, field1;

Now we were capable to simulate the problem at will with the following table:

CREATE TABLE `test` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `data` varchar(64) DEFAULT NULL, `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `field1` varchar(16) DEFAULT NULL, `field2` varchar(16) DEFAULT NULL, `field3` varchar(255) DEFAULT NULL, `field4` varchar(255) DEFAULT NULL, `field5` varchar(32) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=8912746 DEFAULT CHARSET=utf8 ;

An we have seen the query in SHOW PROCESSLIST:

| Query | 26 | Creating sort index | select * from test order by field5, field4, field3, field2, field1 |

But we were still not capable to see who or better how the hell mysqld is filling our disk!

I remembered further that I have seen some strange settings in the my.cnf before when we did the review of the database configuration. But I ignored them somehow.

[mysqld] max_sort_length = 8M sort_buffer_size = 20M

Now I remembered again these settings. We changed max_sort_length back to default 1k and suddenly our space problems disappeared!

We played a bit around with different values of max_sort_length and got the following execution times for our query:

max_sort_lengthexecution time [s]comment 64 8.8 s128 8.2 s256 9.3 s512 11.8 s 1k 14.9 s 2k 20.0 s 8k129.0 s 8M 75.0 sdisk full (50 G)
Conclusion

We set the values of max_sort_length back to the defaults. Our problems disappeared and we got working and much faster SELECT queries.

Do not needlessly change default values of MySQL without proving the impact. It can become worse than before!!!

The default value of max_sort_length is a good compromise between performance and an appropriate sort length.

Addendum

What I really did not like on this solution was, that I did not understand the way the problem occurred. So I did some more investigation in this. We were discussing forth and back if this could be because of XFS, because of sparse files or some kind of memory mapped files (see also man mmap).

At the end I had the idea to look at the lsof command during my running query:

mysql> SELECT * FROM test ORDER BY field5, field4, field3, field2, field1; ERROR 3 (HY000): Error writing file '/tmp/MYBuWcXP' (Errcode: 28 - No space left on device) shell> lsof -p 14733 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME mysqld 14733 mysql 32u REG 8,18 9705619456 30147474 /tmp/MYck8vf4 (deleted) mysqld 14733 mysql 49u REG 8,18 749797376 30147596 /tmp/MYBuWcXP (deleted)

So it looks like that there were some deleted files which were growing!

Further information from the IRC channel led me to the libc temporary files (see also man 3 tmpfile).

And some hints from MadMerlin|work pointed me to:

shell> ls /proc//fd

Where you can also see those temporary files.

Thanks to MadMerlin|work for the hints!

Taxonomy upgrade extras: sortfileorder by

FromDual Performance Monitor for MySQL and MariaDB 0.10.6 has been released

Shinguz - Wed, 2016-08-03 19:40

FromDual has the pleasure to announce the release of the new version 0.10.6 of its popular Database Performance Monitor for MySQL, MariaDB, Galera Cluster and Percona Server fpmmm.

You can download fpmmm from here.

In the inconceivable case that you find a bug in fpmmm please report it to our Bug-tracker.

Any feedback, statements and testimonials are welcome as well! Please send them to feedback@fromdual.com.

This release contains various bug fixes and improvements. The previous release had some major bugs so we recommend to upgrade...

Changes in fpmmm v0.10.6 fpmmm agent
  • Do not connect to server bug fixed.
  • Special case when lock file was removed when it was read is fixed.
  • Added ORDER BY to all GROUP BY to be compliant for the future.
  • Zabbix 3.0 templates added.
  • MaaS: Function curl_file_create implemented for php < 5.5
  • MaaS: Debug message fixed.
  • Maas: Curl upload fixed.
  • MaaS: InnoDB: Deadlock and Foreign Key errors are only escaped with xxx when used in MaaS. Otherwise they are sent normally. Foreign Key errors with MaaS is now also escaped with xxx.
Process module
  • Wrong substitution in process vm calculation fixed.
Galera module
  • Template: Galera items changed from normal to delta.
InnoDB module
  • Template: Fixed InnoDB template to work with Zabbix v3.0.
  • Template: InnoDB locking graph improved.

For subscriptions of commercial use of fpmmm please get in contact with us.

Taxonomy upgrade extras: mysqlperformancemonitormonitoringfpmmmmaasperformance monitormpmrelease

MySQL Environment MyEnv 1.3.1 has been released

Shinguz - Wed, 2016-08-03 08:27

FromDual has the pleasure to announce the release of the new version 1.3.1 of its popular MySQL, Galera Cluster, MariaDB and Percona Server multi-instance environment MyEnv.

The new MyEnv can be downloaded here.

In the inconceivable case that you find a bug in the MyEnv please report it to our bug tracker.

Any feedback, statements and testimonials are welcome as well! Please send them to feedback@fromdual.com.

Upgrade from 1.1.x or higher to 1.3.1 # cd ${HOME}/product # tar xf /download/myenv-1.3.1.tar.gz # rm -f myenv # ln -s myenv-1.3.1 myenv

If you are using plug-ins for showMyEnvStatus create all the links in the new directory structure:

cd ${HOME}/product/myenv ln -s ../../utl/oem_agent.php plg/showMyEnvStatus/
Changes in MyEnv 1.3.1 MyEnv
  • Bash function bootstrap added.
  • Galera options --bootstrap --new-cluster and start method bootstrap was implemented. Typo fixed.
  • New 5.7 variables added and 5.6 variables to avoid nasty warnings in the error log added to the my.cnf template. Further new file system structure was prepared.
  • MySQL 5.7 variables for error log behaviour added.
  • Comment for log_bin added to my.cnf template.
  • ulimit problem fixed rudely in MyEnv init script.
  • wsrep_provider for CentOS added in my.cnf template.
  • Cgroup template improved.
  • Cgroup how-to improved and configuration example added.
MyEnv Installer
  • default as instance name set to blacklist.
  • Typo fixed in help of installMyEnv.
MyEnv Utilities
  • Test table prepared for explicit_defaults_for_timestamp configuration.
  • insert_test.sh now has optional parameters for user, host etc.

For subscriptions of commercial use of MyEnv please get in contact with us.

Taxonomy upgrade extras: myenvoperationMySQL Operationsmulti instanceconsolidationtestingupgradereleasecloudcgroupscontainermysqld_multi

Multiple MySQL Instances on a Single Machine

Jörg Brühe - Thu, 2016-07-28 13:11

Typically, on a single machine (be it a physical or a virtual one) only a single MySQL instance (process) is running. This is perfectly ok for all those situations where a single instance is sufficient, like for storing small amounts of data (RedHat using MySQL for postfix, KDE using it for akonadi, ...), as well as those where a dedicated machine per MySQL instance is appropriate (high CPU load, memory fully loaded, availability requirements).

But there are also those users who want to (or would like to) have multiple instances which would still fit into a single machine. Even among them, a single instance per machine is typical. For this, there are good reasons:

  • MySQL comes with defaults for files (config file, error log, ...) and directories (data directory, binlogs, ...) which would cause conflicts between multiple instances (unless they are changed).
  • The scripts coming with MySQL, especially the automated start/stop with machine reboot/shutdown, are written for a single instance only.
  • Last but not least: The instructions. those in the manual as well as the many "How to setup ..." in the Web, cover a single instance only.
Because of this, users often either restrict themselves to a single instance, or they set up several virtual machines (or containers) holding a single instance each.

But that overhead (both in software and in labour) isn't necessary: There is a way out, supporting easy handling of multiple MySQL instances on a single machine directly, without containers or VMs. This is our "MyEnv" package, available for download here, licensed under the GPL.

What Does MyEnv Do?

MyEnv cares about two aspects which in combination provide easy use of multiple instances:

  • It helps to configure multiple MySQL instances without overlap, so they won't collide with each other.
  • It maintains separate environments, each to manage and access one specific instance.

Each environment contains the path to the binaries (so the instances can use different versions), the config file, the socket and port number, data directory, error log etc. The environment is specified by a name (choose a meaningful one!), and it is switched by using its name as a shell command. (MyEnv creates an alias for that.)

Administrative commands like "start" and "stop" will manage the instance of the current environment. MySQL client programs like "mysql" or "mysqldump" will access that instance.

MyEnv supports the autostart of instances at machine boot, configurable per instance - something which is impossible using only the tools of a MySQL distribution.

Of course, an instance started via MyEnv (either manually or via autostart) can be accessed by any other client program on the machine, or from any other machine in the network - all that is needed is the specification of the proper socket or network port.

Handling Multiple Binaries

In the previous section, I wrote the instances can use different versions. This is done by installing those different versions into different locations, controlled by MyEnv, and the directory with the binaries will become a component of the user's PATH variable, switched when the environment is switched. Obviously, this works only if the destination path of the installation can be controlled, which implies the tar.gz format - RPM or DEB packages have fixed destinations, so different versions would overwrite each other on installation.
But that is no severe limitation, as all MySQL versions are available in tar.gz format, and these are sufficiently generic to run on any reasonably current Linux distribution.
(Yes, that is something I forgot to mention: MyEnv is developed and tested on Linux only. You are welcome to try it on any other Unix platform, and we will gladly listen to your experiences and accept your contributions, but we do not actively pursue non-Linux platforms.)

This support for multiple versions makes MyEnv the perfect tool for application development: Using a single machine, you can let your application access the MySQL servers of different versions and can verify it works the way you want it to.

Similar, you can install binaries of MySQL (Oracle), Percona Server, or MariaDB, and verify your application is portable across them.

And the adventurous among us can use different binaries, from the same or different vendor(s), to test whether replication works across versions and/or vendors, all without the effort of installing a separate VM or container setup.

MyEnv and Galera Cluster Till now, I mentioned MySQL (and its variants), and many readers may associate that term with a traditional single instance. So I better state explicitly: Of course, such an instance can take part in replication, in any role: master, slave, or intermediate in multi-level replication.

But besides single instances and replication, there exists a different MySQL setup: Nodes combined to form a Galera Cluster. And again, let me state explicitly: Again of course, an instance controlled by MyEnv can be a node participating in a Galera Cluster.

Those readers who have experiance with Galera Cluster (or who have just read the documentation or blogs about it) know that to start the first node of a cluster a special command is needed, called "bootstrap" - a simple "start" will not do. So this command was also added to MyEnv, it can manage a Galera Cluster completely by its builtin commands.

RPM and DEB packages Above, I wrote that to install different versions you cannot use RPM or DEB packages. I did not write that MyEnv cannot use RPM or DEB - in fact it can, the absolute path names in these formats just limit this to a single version.

So you can install the RPM or DEB of your choice, disable its autostart, and then call MyEnv to create multiple instances. You will give them different names, specify different sockets and ports and use different data directories, but for all of them you will specify the same path "/usr". As a result, MyEnv will simply manage multiple instances of the same version.

You can configure them differently to test the consequences, or you can set them up to replicate among them - master and slave can run on the same machine. Of course, this will not give you the "high availability" or the "scale-out" benefits which are the typical reasons to use replication, but I trust this wasn't your purpose for this test.

Using binaries that include Galera, and configuring them properly, you can even run all nodes of a Galera Cluster as separate instances on a single machine. That may be considered to stretch the concept, because a single machine is a very different setup than separate machines, but it gives an idea of the possibilities opened by MyEnv.

Typical Use of MyEnv

Admitted: The claim to know what MyEnv is used for by others would be arrogant, and I do not uphold it. Nonetheless, we do know some use cases of people who downloaded MyEnv, and they are close to our internal use of the tool.

MyEnv allows to have multiple MySQL instances on the same machine, to manage them separately, and to access them using MySQL client programs or other applications. So it is the perfect setup for all those who need to access different versions: developers and software testers.

When we encounter some unexpected behaviour, we often want to know whether it is specific to some version or series, or is widespread. To check that, MyEnv is the perfect infrastructure: You write a test case to provoke the effect and run it on several versions, then you note the result and can tell whether it exists "since ages" or is new, whether it still occurs in current versions or will change with an upgrade - exactly the information you need to decide about an upgrade or write a bug report.

Database administrators and application developers use it to avoid nasty surprises with new versions, so their production instances will not suffer from unexpected functional changes. Setting up a test environment, especially for multiple versions, becomes cheap, much less ressources are needed. You don't need to copy your test code onto different machines, and you are sure you are running identical tests, so that you won't compare apples and oranges.

Invitation

If all that made you curious, I invite you to look into the instructions, to download MyEnv and to try it. And of course, your feedback and reports are very welcome.

Take care!

Appendix: Where to Meet Us

All FromDual colleagues will deliver talks at the FrOSCon in St. Augustin near Cologne, Germany, on August 20 and 21, so that is a good opportunity for personal contact. As several talks will be delivered in English, the conference also meets the needs of attendants who cannot follow a German talk - check the programme. Froscon is a famous event, very interesting talks are promised, and I look forward to enjoy the community atmosphere there.

I will deliver a talk at the "Open Source Backup Conference" in Cologne, Germany, on September 26 and 27; this conference is held in English.

I do not have feedback yet about Percona Live in Amsterdam, I may attend that also.

And finally, FromDual will again have a booth and deliver talks at the DOAG conference on November 15 - 18 in Nuremberg, Germany. This is "the" event for Oracle users (at least in Germany, maybe in all Europe), and it has a separate track dealing with MySQL only.

We will be delighted to meet you face to face!

Taxonomy upgrade extras: MyEnv

Multiple MySQL Instances on a Single Machine

Jörg Brühe - Thu, 2016-07-28 13:11

Typically, on a single machine (be it a physical or a virtual one) only a single MySQL instance (process) is running. This is perfectly ok for all those situations where a single instance is sufficient, like for storing small amounts of data (RedHat using MySQL for postfix, KDE using it for akonadi, ...), as well as those where a dedicated machine per MySQL instance is appropriate (high CPU load, memory fully loaded, availability requirements).

But there are also those users who want to (or would like to) have multiple instances which would still fit into a single machine. Even among them, a single instance per machine is typical. For this, there are good reasons:

  • MySQL comes with defaults for files (config file, error log, ...) and directories (data directory, binlogs, ...) which would cause conflicts between multiple instances (unless they are changed).
  • The scripts coming with MySQL, especially the automated start/stop with machine reboot/shutdown, are written for a single instance only.
  • Last but not least: The instructions. those in the manual as well as the many "How to setup ..." in the Web, cover a single instance only.
Because of this, users often either restrict themselves to a single instance, or they set up several virtual machines (or containers) holding a single instance each.

But that overhead (both in software and in labour) isn't necessary: There is a way out, supporting easy handling of multiple MySQL instances on a single machine directly, without containers or VMs. This is our "MyEnv" package, available for download here, licensed under the GPL.

What Does MyEnv Do?

MyEnv cares about two aspects which in combination provide easy use of multiple instances:

  • It helps to configure multiple MySQL instances without overlap, so they won't collide with each other.
  • It maintains separate environments, each to manage and access one specific instance.

Each environment contains the path to the binaries (so the instances can use different versions), the config file, the socket and port number, data directory, error log etc. The environment is specified by a name (choose a meaningful one!), and it is switched by using its name as a shell command. (MyEnv creates an alias for that.)

Administrative commands like "start" and "stop" will manage the instance of the current environment. MySQL client programs like "mysql" or "mysqldump" will access that instance.

MyEnv supports the autostart of instances at machine boot, configurable per instance - something which is impossible using only the tools of a MySQL distribution.

Of course, an instance started via MyEnv (either manually or via autostart) can be accessed by any other client program on the machine, or from any other machine in the network - all that is needed is the specification of the proper socket or network port.

Handling Multiple Binaries

In the previous section, I wrote the instances can use different versions. This is done by installing those different versions into different locations, controlled by MyEnv, and the directory with the binaries will become a component of the user's PATH variable, switched when the environment is switched. Obviously, this works only if the destination path of the installation can be controlled, which implies the tar.gz format - RPM or DEB packages have fixed destinations, so different versions would overwrite each other on installation.
But that is no severe limitation, as all MySQL versions are available in tar.gz format, and these are sufficiently generic to run on any reasonably current Linux distribution.
(Yes, that is something I forgot to mention: MyEnv is developed and tested on Linux only. You are welcome to try it on any other Unix platform, and we will gladly listen to your experiences and accept your contributions, but we do not actively pursue non-Linux platforms.)

This support for multiple versions makes MyEnv the perfect tool for application development: Using a single machine, you can let your application access the MySQL servers of different versions and can verify it works the way you want it to.

Similar, you can install binaries of MySQL (Oracle), Percona Server, or MariaDB, and verify your application is portable across them.

And the adventurous among us can use different binaries, from the same or different vendor(s), to test whether replication works across versions and/or vendors, all without the effort of installing a separate VM or container setup.

MyEnv and Galera Cluster Till now, I mentioned MySQL (and its variants), and many readers may associate that term with a traditional single instance. So I better state explicitly: Of course, such an instance can take part in replication, in any role: master, slave, or intermediate in multi-level replication.

But besides single instances and replication, there exists a different MySQL setup: Nodes combined to form a Galera Cluster. And again, let me state explicitly: Again of course, an instance controlled by MyEnv can be a node participating in a Galera Cluster.

Those readers who have experiance with Galera Cluster (or who have just read the documentation or blogs about it) know that to start the first node of a cluster a special command is needed, called "bootstrap" - a simple "start" will not do. So this command was also added to MyEnv, it can manage a Galera Cluster completely by its builtin commands.

RPM and DEB packages Above, I wrote that to install different versions you cannot use RPM or DEB packages. I did not write that MyEnv cannot use RPM or DEB - in fact it can, the absolute path names in these formats just limit this to a single version.

So you can install the RPM or DEB of your choice, disable its autostart, and then call MyEnv to create multiple instances. You will give them different names, specify different sockets and ports and use different data directories, but for all of them you will specify the same path "/usr". As a result, MyEnv will simply manage multiple instances of the same version.

You can configure them differently to test the consequences, or you can set them up to replicate among them - master and slave can run on the same machine. Of course, this will not give you the "high availability" or the "scale-out" benefits which are the typical reasons to use replication, but I trust this wasn't your purpose for this test.

Using binaries that include Galera, and configuring them properly, you can even run all nodes of a Galera Cluster as separate instances on a single machine. That may be considered to stretch the concept, because a single machine is a very different setup than separate machines, but it gives an idea of the possibilities opened by MyEnv.

Typical Use of MyEnv

Admitted: The claim to know what MyEnv is used for by others would be arrogant, and I do not uphold it. Nonetheless, we do know some use cases of people who downloaded MyEnv, and they are close to our internal use of the tool.

MyEnv allows to have multiple MySQL instances on the same machine, to manage them separately, and to access them using MySQL client programs or other applications. So it is the perfect setup for all those who need to access different versions: developers and software testers.

When we encounter some unexpected behaviour, we often want to know whether it is specific to some version or series, or is widespread. To check that, MyEnv is the perfect infrastructure: You write a test case to provoke the effect and run it on several versions, then you note the result and can tell whether it exists "since ages" or is new, whether it still occurs in current versions or will change with an upgrade - exactly the information you need to decide about an upgrade or write a bug report.

Database administrators and application developers use it to avoid nasty surprises with new versions, so their production instances will not suffer from unexpected functional changes. Setting up a test environment, especially for multiple versions, becomes cheap, much less ressources are needed. You don't need to copy your test code onto different machines, and you are sure you are running identical tests, so that you won't compare apples and oranges.

Invitation

If all that made you curious, I invite you to look into the instructions, to download MyEnv and to try it. And of course, your feedback and reports are very welcome.

Take care!

Appendix: Where to Meet Us

All FromDual colleagues will deliver talks at the FrOSCon in St. Augustin near Cologne, Germany, on August 20 and 21, so that is a good opportunity for personal contact. As several talks will be delivered in English, the conference also meets the needs of attendants who cannot follow a German talk - check the programme. Froscon is a famous event, very interesting talks are promised, and I look forward to enjoy the community atmosphere there.

I will deliver a talk at the "Open Source Backup Conference" in Cologne, Germany, on September 26 and 27; this conference is held in English.

I do not have feedback yet about Percona Live in Amsterdam, I may attend that also.

And finally, FromDual will again have a booth and deliver talks at the DOAG conference on November 15 - 18 in Nuremberg, Germany. This is "the" event for Oracle users (at least in Germany, maybe in all Europe), and it has a separate track dealing with MySQL only.

We will be delighted to meet you face to face!

Taxonomy upgrade extras: MyEnv

Multiple MySQL Instances on a Single Machine

Jörg Brühe - Thu, 2016-07-28 13:11

Typically, on a single machine (be it a physical or a virtual one) only a single MySQL instance (process) is running. This is perfectly ok for all those situations where a single instance is sufficient, like for storing small amounts of data (RedHat using MySQL for postfix, KDE using it for akonadi, ...), as well as those where a dedicated machine per MySQL instance is appropriate (high CPU load, memory fully loaded, availability requirements).

But there are also those users who want to (or would like to) have multiple instances which would still fit into a single machine. Even among them, a single instance per machine is typical. For this, there are good reasons:

  • MySQL comes with defaults for files (config file, error log, ...) and directories (data directory, binlogs, ...) which would cause conflicts between multiple instances (unless they are changed).
  • The scripts coming with MySQL, especially the automated start/stop with machine reboot/shutdown, are written for a single instance only.
  • Last but not least: The instructions. those in the manual as well as the many "How to setup ..." in the Web, cover a single instance only.
Because of this, users often either restrict themselves to a single instance, or they set up several virtual machines (or containers) holding a single instance each.

But that overhead (both in software and in labour) isn't necessary: There is a way out, supporting easy handling of multiple MySQL instances on a single machine directly, without containers or VMs. This is our "MyEnv" package, available for download here, licensed under the GPL.

What Does MyEnv Do?

MyEnv cares about two aspects which in combination provide easy use of multiple instances:

  • It helps to configure multiple MySQL instances without overlap, so they won't collide with each other.
  • It maintains separate environments, each to manage and access one specific instance.

Each environment contains the path to the binaries (so the instances can use different versions), the config file, the socket and port number, data directory, error log etc. The environment is specified by a name (choose a meaningful one!), and it is switched by using its name as a shell command. (MyEnv creates an alias for that.)

Administrative commands like "start" and "stop" will manage the instance of the current environment. MySQL client programs like "mysql" or "mysqldump" will access that instance.

MyEnv supports the autostart of instances at machine boot, configurable per instance - something which is impossible using only the tools of a MySQL distribution.

Of course, an instance started via MyEnv (either manually or via autostart) can be accessed by any other client program on the machine, or from any other machine in the network - all that is needed is the specification of the proper socket or network port.

Handling Multiple Binaries

In the previous section, I wrote the instances can use different versions. This is done by installing those different versions into different locations, controlled by MyEnv, and the directory with the binaries will become a component of the user's PATH variable, switched when the environment is switched. Obviously, this works only if the destination path of the installation can be controlled, which implies the tar.gz format - RPM or DEB packages have fixed destinations, so different versions would overwrite each other on installation.
But that is no severe limitation, as all MySQL versions are available in tar.gz format, and these are sufficiently generic to run on any reasonably current Linux distribution.
(Yes, that is something I forgot to mention: MyEnv is developed and tested on Linux only. You are welcome to try it on any other Unix platform, and we will gladly listen to your experiences and accept your contributions, but we do not actively pursue non-Linux platforms.)

This support for multiple versions makes MyEnv the perfect tool for application development: Using a single machine, you can let your application access the MySQL servers of different versions and can verify it works the way you want it to.

Similar, you can install binaries of MySQL (Oracle), Percona Server, or MariaDB, and verify your application is portable across them.

And the adventurous among us can use different binaries, from the same or different vendor(s), to test whether replication works across versions and/or vendors, all without the effort of installing a separate VM or container setup.

MyEnv and Galera Cluster Till now, I mentioned MySQL (and its variants), and many readers may associate that term with a traditional single instance. So I better state explicitly: Of course, such an instance can take part in replication, in any role: master, slave, or intermediate in multi-level replication.

But besides single instances and replication, there exists a different MySQL setup: Nodes combined to form a Galera Cluster. And again, let me state explicitly: Again of course, an instance controlled by MyEnv can be a node participating in a Galera Cluster.

Those readers who have experiance with Galera Cluster (or who have just read the documentation or blogs about it) know that to start the first node of a cluster a special command is needed, called "bootstrap" - a simple "start" will not do. So this command was also added to MyEnv, it can manage a Galera Cluster completely by its builtin commands.

RPM and DEB packages Above, I wrote that to install different versions you cannot use RPM or DEB packages. I did not write that MyEnv cannot use RPM or DEB - in fact it can, the absolute path names in these formats just limit this to a single version.

So you can install the RPM or DEB of your choice, disable its autostart, and then call MyEnv to create multiple instances. You will give them different names, specify different sockets and ports and use different data directories, but for all of them you will specify the same path "/usr". As a result, MyEnv will simply manage multiple instances of the same version.

You can configure them differently to test the consequences, or you can set them up to replicate among them - master and slave can run on the same machine. Of course, this will not give you the "high availability" or the "scale-out" benefits which are the typical reasons to use replication, but I trust this wasn't your purpose for this test.

Using binaries that include Galera, and configuring them properly, you can even run all nodes of a Galera Cluster as separate instances on a single machine. That may be considered to stretch the concept, because a single machine is a very different setup than separate machines, but it gives an idea of the possibilities opened by MyEnv.

Typical Use of MyEnv

Admitted: The claim to know what MyEnv is used for by others would be arrogant, and I do not uphold it. Nonetheless, we do know some use cases of people who downloaded MyEnv, and they are close to our internal use of the tool.

MyEnv allows to have multiple MySQL instances on the same machine, to manage them separately, and to access them using MySQL client programs or other applications. So it is the perfect setup for all those who need to access different versions: developers and software testers.

When we encounter some unexpected behaviour, we often want to know whether it is specific to some version or series, or is widespread. To check that, MyEnv is the perfect infrastructure: You write a test case to provoke the effect and run it on several versions, then you note the result and can tell whether it exists "since ages" or is new, whether it still occurs in current versions or will change with an upgrade - exactly the information you need to decide about an upgrade or write a bug report.

Database administrators and application developers use it to avoid nasty surprises with new versions, so their production instances will not suffer from unexpected functional changes. Setting up a test environment, especially for multiple versions, becomes cheap, much less ressources are needed. You don't need to copy your test code onto different machines, and you are sure you are running identical tests, so that you won't compare apples and oranges.

Invitation

If all that made you curious, I invite you to look into the instructions, to download MyEnv and to try it. And of course, your feedback and reports are very welcome.

Take care!

Appendix: Where to Meet Us

All FromDual colleagues will deliver talks at the FrOSCon in St. Augustin near Cologne, Germany, on August 20 and 21, so that is a good opportunity for personal contact. As several talks will be delivered in English, the conference also meets the needs of attendants who cannot follow a German talk - check the programme. Froscon is a famous event, very interesting talks are promised, and I look forward to enjoy the community atmosphere there.

I will deliver a talk at the "Open Source Backup Conference" in Cologne, Germany, on September 26 and 27; this conference is held in English.

I do not have feedback yet about Percona Live in Amsterdam, I may attend that also.

And finally, FromDual will again have a booth and deliver talks at the DOAG conference on November 15 - 18 in Nuremberg, Germany. This is "the" event for Oracle users (at least in Germany, maybe in all Europe), and it has a separate track dealing with MySQL only.

We will be delighted to meet you face to face!

Temporary tables and MySQL STATUS information

Shinguz - Fri, 2016-07-08 18:42

When analysing MySQL configuration and status information at customers it is always interesting to see how the applications behave. This can partially be seen by the output of the SHOW GLOBAL STATUS command. See also Reading MySQL fingerprints.

Today we wanted to know where the high Com_create_table and the twice as high Com_drop_table is coming from. One suspect was TEMPORARY TABLES. But are real temporary tables counted as Com_create_table and Com_drop_table at all? This is what we want to find out today. The tested MySQL version is 5.7.11.

Caution: Different MySQL or MariaDB versions might behave differently!

Session 1 Global Session 2 CREATE TABLE t1 (id INT);
Query OK, 0 rows affected     Com_create_table +1
Opened_table_definitions +1 Com_create_table +1
Opened_table_definitions +1    CREATE TABLE t1 (id INT);
ERROR 1050 (42S01): Table 't1' already exists     Com_create_table +1
Open_table_definitions +1
Open_tables +1
Opened_table_definitions +1
Opened_tables +1 Com_create_table + 1
Open_table_definitions +1
Open_tables +1
Opened_table_definitions +1
Opened_tables +1    CREATE TABLE t1 (id INT);
ERROR 1050 (42S01): Table 't1' already exists     Com_create_table + 1 Com_create_table + 1    DROP TABLE t1;
Query OK, 0 rows affected     Com_drop_table +1
Open_table_definitions -1
Open_tables -1 Com_drop_table +1
Open_table_definitions -1
Open_tables -1    DROP TABLE t1;
ERROR 1051 (42S02): Unknown table 'test.t1'     Com_drop_table -1 Com_drop_table -1    CREATE TEMPORARY TABLE ttemp (id INT);
Query OK, 0 rows affected     Com_create_table +1
Opened_table_definitions +2
Opened_tables +1 Com_create_table +1
Opened_table_definitions +2
Opened_tables +1    CREATE TEMPORARY TABLE ttemp (id INT);
ERROR 1050 (42S01): Table 'ttemp' already exists     Com_create_table +1 Com_create_table +1    DROP TABLE ttemp;
Query OK, 0 rows affected     Com_drop_table +1 Com_drop_table +1    CREATE TEMPORARY TABLE ttemp (id int);
Query OK, 0 rows affected   CREATE TEMPORARY TABLE ttemp (id int);
Query OK, 0 rows affected Com_create_table +1
Opened_table_definitions +2
Opened_tables +1 Com_create_table +2
Opened_table_definitions +4
Opened_tables +2 Com_create_table +1
Opened_table_definitions +2
Opened_tables +1  DROP TABLE ttemp;
Query OK, 0 rows affected   DROP TABLE ttemp;
Query OK, 0 rows affected Com_drop_table +1 Com_drop_table +2 Com_drop_table +1
Conclusion
  • A successful CREATE TABLE command opens and closes a table definition.
  • A non successful CREATE TABLE command opens the table definition and the file handle of the previous table. So a faulty application can be quite expensive.
  • A further non successful CREATE TABLE command has no other impact.
  • A DROP TABLE command closes a table definition and the file handle.
  • A CREATE TEMPORARY TABLE opens 2 table definitions and the file handle. Thus behaves different than CREATE TABLE
  • But a faulty CREATE TEMPORARY TABLE seems to be much less intrusive.
  • Open_table_definitions and Open_tables is always global, also in session context.
Taxonomy upgrade extras: statustemporary table

Why is varchar(255) not varchar(255)?

Cédric Bruderer - Fri, 2016-06-24 16:18

Recently I was working on a clients question and stumbled over an issue with replication and mixed character sets. The client asked, wether it is possible to replicate data to a table on a MySQL slave, where one column had a different character set, than the column in the same table on the master.

 

I set up two servers with identical table definitions and changed the character set on one column on the slave from latin1 to utf8.

 

Master:

CREATE TABLE `test` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `data` varchar(255) DEFAULT NULL, `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

Slave:

CREATE TABLE `test` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `data` varchar(255) CHARACTER SET utf8 DEFAULT NULL, `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

So far no problem, I was able to start the replication and set off some INSERT statements with special characters (like ä, ö, ü, ...). But when I went to look for them in the slave's table, I could not find them.

 

"SHOW SLAVE STATUS", showed me this error:

Column 1 of table 'test.test' cannot be converted from type 'varchar(255)' to type 'varchar(255)'

 

You might ask yourself now: But the columns have the same type, what is the problem? What is not shown in the error is the fact, that there are two different character sets.

 

The log file is of no help either. It only shows the same error and tells you to fix it.

2016-05-26 15:51:06 9269 [ERROR] Slave SQL: Column 1 of table 'test.test' cannot be converted from type 'varchar(255)' to type 'varchar(255)', Error_code: 1677 2016-05-26 15:51:06 9269 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'valkyrie_mysqld35701_binlog.000050' position 120 2016-05-26 15:53:39 9269 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)

 

Skipping the statement will not work, as the server will just fail again, when the next statement shows up.

 

For all those who are now running to change the character set: STOP!

Changing characters set of columns or tables containing data can be fatal when done incorrectly. MySQL offers a statement to convert tables and columns to the character set you wish to have.

 

To convert the entire table, you can write:

ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name;

 

To convert a single column, you can write:

ALTER TABLE tbl_name MODIFY latin1_column TEXT CHARACTER SET utf8;

 

More details can be found in the ALTER TABLE documentation of MySQL. (Converting character sets is at the end of the article.)

 

Just to be clear, this is no bug! MySQL replication was never intended to work with mixed character sets and it makes a lot of sense, that the replication is halted when differences are discovered. This test was only an experiment.

Taxonomy upgrade extras: replicationcharacter setutf8utf8mb4

Why is varchar(255) not varchar(255)?

Cédric Bruderer - Fri, 2016-06-24 16:18

Recently I was working on a clients question and stumbled over an issue with replication and mixed character sets. The client asked, wether it is possible to replicate data to a table on a MySQL slave, where one column had a different character set, than the column in the same table on the master.

 

I set up two servers with identical table definitions and changed the character set on one column on the slave from latin1 to utf8.

 

Master:

CREATE TABLE `test` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `data` varchar(255) DEFAULT NULL, `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

Slave:

CREATE TABLE `test` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `data` varchar(255) CHARACTER SET utf8 DEFAULT NULL, `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

So far no problem, I was able to start the replication and set off some INSERT statements with special characters (like ä, ö, ü, ...). But when I went to look for them in the slave's table, I could not find them.

 

"SHOW SLAVE STATUS", showed me this error:

Column 1 of table 'test.test' cannot be converted from type 'varchar(255)' to type 'varchar(255)'

 

You might ask yourself now: But the columns have the same type, what is the problem? What is not shown in the error is the fact, that there are two different character sets.

 

The log file is of no help either. It only shows the same error and tells you to fix it.

2016-05-26 15:51:06 9269 [ERROR] Slave SQL: Column 1 of table 'test.test' cannot be converted from type 'varchar(255)' to type 'varchar(255)', Error_code: 1677 2016-05-26 15:51:06 9269 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'valkyrie_mysqld35701_binlog.000050' position 120 2016-05-26 15:53:39 9269 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)

 

Skipping the statement will not work, as the server will just fail again, when the next statement shows up.

 

For all those who are now running to change the character set: STOP!

Changing characters set of columns or tables containing data can be fatal when done incorrectly. MySQL offers a statement to convert tables and columns to the character set you wish to have.

 

To convert the entire table, you can write:

ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name;

 

To convert a single column, you can write:

ALTER TABLE tbl_name MODIFY latin1_column TEXT CHARACTER SET utf8;

 

More details can be found in the ALTER TABLE documentation of MySQL. (Converting character sets is at the end of the article.)

 

Just to be clear, this is no bug! MySQL replication was never intended to work with mixed character sets and it makes a lot of sense, that the replication is halted when differences are discovered. This test was only an experiment.

Why is varchar(255) not varchar(255)?

Cédric Bruderer - Fri, 2016-06-24 16:18

Recently I was working on a clients question and stumbled over an issue with replication and mixed character sets. The client asked, wether it is possible to replicate data to a table on a MySQL slave, where one column had a different character set, than the column in the same table on the master.

 

I set up two servers with identical table definitions and changed the character set on one column on the slave from latin1 to utf8.

 

Master:

CREATE TABLE `test` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `data` varchar(255) DEFAULT NULL, `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

Slave:

CREATE TABLE `test` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `data` varchar(255) CHARACTER SET utf8 DEFAULT NULL, `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

So far no problem, I was able to start the replication and set off some INSERT statements with special characters (like ä, ö, ü, ...). But when I went to look for them in the slave's table, I could not find them.

 

"SHOW SLAVE STATUS", showed me this error:

Column 1 of table 'test.test' cannot be converted from type 'varchar(255)' to type 'varchar(255)'

 

You might ask yourself now: But the columns have the same type, what is the problem? What is not shown in the error is the fact, that there are two different character sets.

 

The log file is of no help either. It only shows the same error and tells you to fix it.

2016-05-26 15:51:06 9269 [ERROR] Slave SQL: Column 1 of table 'test.test' cannot be converted from type 'varchar(255)' to type 'varchar(255)', Error_code: 1677 2016-05-26 15:51:06 9269 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'valkyrie_mysqld35701_binlog.000050' position 120 2016-05-26 15:53:39 9269 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)

 

Skipping the statement will not work, as the server will just fail again, when the next statement shows up.

 

For all those who are now running to change the character set: STOP!

Changing characters set of columns or tables containing data can be fatal when done incorrectly. MySQL offers a statement to convert tables and columns to the character set you wish to have.

 

To convert the entire table, you can write:

ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name;

 

To convert a single column, you can write:

ALTER TABLE tbl_name MODIFY latin1_column TEXT CHARACTER SET utf8;

 

More details can be found in the ALTER TABLE documentation of MySQL. (Converting character sets is at the end of the article.)

 

Just to be clear, this is no bug! MySQL replication was never intended to work with mixed character sets and it makes a lot of sense, that the replication is halted when differences are discovered. This test was only an experiment.

MySQL spatial functionality - points of interest around me

Shinguz - Wed, 2016-06-01 10:13

This week I was preparing the exercises for our MySQL/MariaDB for Beginners training. One of the exercises of the training is about MySQL spatial (GIS) features. I always tell customers: "With these features you can answer questions like: Give me all points of interest around me!"

Now I wanted to try out how it really works and if it is that easy at all...

To get myself an idea of what I want to do I did a little sketch first:

   My position   Shops   Restaurants   Cafes

To do this I needed a table and some data:

CREATE TABLE poi ( id INT UNSIGNED NOT NULL AUTO_INCREMENT , name VARCHAR(40) , type VARCHAR(20) , sub_type VARCHAR(20) , pt POINT NOT NULL , PRIMARY KEY (id) , SPATIAL INDEX(pt) ) ENGINE=InnoDB; INSERT INTO poi (name, type, sub_type, pt) VALUES ('Shop 1', 'Shop', 'Cloth', Point(2,2)) , ('Cafe 1', 'Cafe', '', Point(11,2)) , ('Shop 2', 'Shop', 'Cloth', Point(5,4)) , ('Restaurant 1', 'Restaurant', 'Portugies', Point(8,7)) , ('Cafe 2', 'Cafe', '', Point(3,9)) , ('Shop 3', 'Shop', 'Hardware', Point(11,9)) ;

This looks as follows:

SELECT id, CONCAT(ST_X(pt), '/', ST_Y(pt)) AS "X/Y", name, type, sub_type FROM poi; +----+-----------+--------------+------------+-----------+ | id | X/Y | name | type | sub_type | +----+-----------+--------------+------------+-----------+ | 1 | 2/2 | Shop 1 | Shop | Cloth | | 2 | 11/2 | Cafe 1 | Cafe | | | 3 | 5/4 | Shop 2 | Shop | Cloth | | 4 | 8/7 | Restaurant 1 | Restaurant | Portugies | | 5 | 3/9 | Cafe 2 | Cafe | | | 6 | 11/9 | Shop 3 | Shop | Hardware | +----+-----------+--------------+------------+-----------+

Now the question: "Give me all shops in a distance of 4.5 units around me":

SET @hereami = POINT(9,4); SELECT id, ST_AsText(pt) AS point, name, ROUND(ST_Distance(@hereami, pt), 2) AS distance FROM poi WHERE ST_Distance(@hereami, pt) < 4.5 AND type = 'Shop' ORDER BY distance ASC ; +----+------------+--------+----------+ | id | point | name | distance | +----+------------+--------+----------+ | 3 | POINT(5 4) | Shop 2 | 4.00 | +----+------------+--------+----------+ 1 row in set (0.37 sec)

The query execution plan looks like this:

id: 1 select_type: SIMPLE table: poi partitions: NULL type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 650361 filtered: 10.00 Extra: Using where; Using filesort

So no use of the spatial index yet. :-(

Reading the MySQL documentation Using Spatial Indexes provides some more information:

The optimizer investigates whether available spatial indexes can be involved in the search for queries that use a function such as MBRContains() or MBRWithin() in the WHERE clause.

So it looks like the optimizer CAN evaluate function covered fields in this specific case. But not with the function ST_Distance I have chosen.

So my WHERE clause must look like: "Give me all points within a polygon spanned 4.5 units around my position..."

I did not find any such function in the short run. So I created a hexagon which is not too far from a circle...

With this hexagon I tried again:

SET @hereami = POINT(9,4); SET @hexagon = 'POLYGON((9 8.5, 12.897 6.25, 12.897 1.75, 9 -0.5, 5.103 1.75, 5.103 6.25, 9 8.5))'; SELECT id, ST_AsText(pt) AS point, name, ROUND(ST_Distance(@hereami, pt), 2) AS distance FROM poi WHERE MBRContains(ST_GeomFromText(@hexagon), pt) AND ST_Distance(@hereami, pt) < 4.5 AND type = 'Shop' ORDER BY distance ASC ; Empty set (0.03 sec)

And tadaaah: Damned fast, but the result is not the same! :-( When you look at the graph above it is obvious why: The missing shop is 0.103 units outside of our hexagon search range but within our circle range. So an octagon would have been the better approach...

At least the index is considered now! :-)

id: 1 select_type: SIMPLE table: poi partitions: NULL type: range possible_keys: pt key: pt key_len: 34 ref: NULL rows: 31356 filtered: 10.00 Extra: Using where; Using filesort

For specifying a an "outer" hexagon I was too lazy. So I was specifying a square:

SET @hereami = POINT(9,4); SET @square = 'POLYGON((4.5 8.5, 13.5 8.5, 13.5 -0.5, 4.5 -0.5, 4.5 8.5))'; SELECT id, ST_AsText(pt) AS point, name, ROUND(ST_Distance(@hereami, pt), 2) AS distance FROM poi WHERE MBRContains(ST_GeomFromText(@square), pt) AND ST_Distance(@hereami, pt) < 4.5 AND type = 'Shop' ORDER BY distance ASC ; +----+------------+--------+----------+ | id | point | name | distance | +----+------------+--------+----------+ | 3 | POINT(5 4) | Shop 2 | 4.00 | +----+------------+--------+----------+ 1 row in set (0.02 sec)

So, my shop is in the result again now. And even a bit faster!

Now I wanted to find out if this results are any faster than the conventional method with an index on (x) and (y) or (x, y):

SELECT id, ST_AsText(pt) AS point, name, ROUND(ST_Distance(@hereami, pt), 2) AS distance FROM poi WHERE x >= 4.5 AND x <= 13.5 AND y >= -0.5 AND y <= 8.5 AND ST_Distance(@hereami, pt) < 4.5 AND type = 'Shop' ORDER BY distance ASC ; 1 row in set (0.15 sec)

Here the optimizer chooses the index on x. But I think he could do better. So I forced to optimizer to use the index on (x, y):

SELECT id, ST_AsText(pt) AS point, name, ROUND(ST_Distance(@hereami, pt), 2) AS distance FROM poi FORCE INDEX (xy) WHERE x >= 4.5 AND x <= 13.5 AND y >= -0.5 AND y <= 8.5 AND ST_Distance(@hereami, pt) < 4.5 AND type = 'Shop' ORDER BY distance ASC ; 1 row in set (0.03 sec) id: 1 select_type: SIMPLE table: poi partitions: NULL type: range possible_keys: xy key: xy key_len: 10 ref: NULL rows: 115592 filtered: 1.11 Extra: Using index condition; Using where; Using filesort

Same performance than with the spatial index. So it looks like for this simple task with my data distribution conventional methods do well enough.

No I wanted to try a polygon which comes as close as possible to a circle. This I solved with a MySQL stored function which returns a polygon:/p>

DROP FUNCTION polygon_circle; delimiter // CREATE FUNCTION polygon_circle(pX DOUBLE, pY DOUBLE, pDiameter DOUBLE, pPoints SMALLINT UNSIGNED) -- RETURNS VARCHAR(4096) DETERMINISTIC RETURNS POLYGON DETERMINISTIC BEGIN DECLARE i SMALLINT UNSIGNED DEFAULT 0; DECLARE vSteps SMALLINT UNSIGNED; DECLARE vPolygon VARCHAR(4096) DEFAULT ''; -- Input validation IF pPoints < 3 THEN RETURN NULL; END IF; IF pPoints > 360 THEN RETURN NULL; END IF; IF pPoints > 90 THEN RETURN NULL; END IF; if (360 % pPoints) != 0 THEN RETURN NULL; END IF; -- Start SET vSteps = 360 / pPoints; WHILE i < 360 DO SET vPolygon = CONCAT(vPolygon, (pX + (SIN(i * 2 * PI() / 360) * pDiameter)), ' ', (pY + (COS(i * 2 * PI() / 360) * pDiameter)), ', '); SET i = i + vSteps; END WHILE; -- Add first point again SET vPolygon = CONCAT("POLYGON((", vPolygon, (pX + (SIN(0 * 2 * PI() / 360) * pDiameter)), " ", (pY + (COS(0 * 2 * PI() / 360) * pDiameter)), "))"); -- RETURN vPolygon; RETURN ST_GeomFromText(vPolygon); END; // delimiter ; SELECT ST_AsText(polygon_circle(9, 4, 4.5, 6)); -- SELECT polygon_circle(9, 4, 4.5, 8);

Then calling the query in the same way:

SET @hereami = POINT(9,4); SELECT id, ST_AsText(pt) AS point, name, ROUND(ST_Distance(@hereami, pt), 2) AS distance FROM poi WHERE MBRContains(polygon_circle(9, 4, 4.5, 90), pt) AND ST_Distance(@hereami, pt) < 4.5 AND type = 'Shop' ORDER BY distance ASC ; +----+------------+--------+----------+ | id | point | name | distance | +----+------------+--------+----------+ | 3 | POINT(5 4) | Shop 2 | 4.00 | +----+------------+--------+----------+ 1 row in set (0.03 sec)

This seems not to have any significant negative impact on performance.

Results Test#rowsoperationlatencyTotal655360FTS1300 msSpatial exact Circle4128FTS520 msSpatial inner Hexagon3916range (pt)20 msSpatial outer Square4128range (pt)30 msConventional outer Square on (x)4128range (x) or (y)150 msConventional outer Square on (xy)4128range (x,y)30 msSpatial good Polygon4128range (pt)30 msTaxonomy upgrade extras: spatialgis

Pages

Subscribe to FromDual Aggregator – FromDual all (en)