Package Details: mysql-clients 8.0.17-1

Git Clone URL: https://aur.archlinux.org/mysql.git (read-only)
Package Base: mysql
Description: MySQL client tools
Upstream URL: https://www.mysql.com/products/community/
Licenses: GPL
Conflicts: mariadb-clients
Provides: mariadb-clients=8.0.17, mysql-clients=8.0.17
Submitter: Barthalion
Maintainer: Muflone
Last Packager: Muflone
Votes: 66
Popularity: 0.672277
First Submitted: 2013-04-25 19:13
Last Updated: 2019-08-04 13:39

Required by (55)

Sources (6)

Latest Comments

1 2 3 4 5 6 ... Next › Last »

FrederickZh commented on 2019-08-18 12:57

It seems that there are several missing files in this package compared with the official ones for Ubuntu 18.04 amd64. Here's a summary CSV I put together: https://gist.github.com/Frederick888/dbc2b80f176d79dcfbd7fb4bafac178a

The following patch fixes the missing mysqlx headers and mysqlbinlog. Additionally, I moved mysql_upgrade to a separate block as it was removed cos of a different reason; libmysqlclient.a to libmysqlclient since in Ubuntu it's also in libmysqlclient-dev; and imho I don't think removing the compiled binaries in build() is a good practice as it voids the purpose of makepkg flags such as -R, -C (and AUR helpers like yay actually asks users whether a clean build is needed) hence the mkdir part at the beginning. I'm not quite sure why some plugins, e.g. innodb_engine.so, are not even built tho (didn't see them in cmake --build . --target help).

diff --git a/PKGBUILD b/PKGBUILD
index dff0e9a..d128267 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -28,10 +28,9 @@ sha256sums=('d44231316ce30a1d1189125ceed86d3388409778e17d0e3b9a060f532463e29a'
             '8fbedfc2c5fe271ed13217feeceeac00202d2cb135e4283eeee2f9a13d6251af'
             '9e585631cfe95da9d18df6c64fca370c0aff2b2cda5dc29f694579dab9d9f561')

 build() {
-  rm -rf build
-  mkdir build
+  mkdir -p build
   cd build

   cmake "../${pkgbase}-${pkgver}" \
     -DCMAKE_AR=/usr/bin/gcc-ar \
@@ -93,8 +92,11 @@ package_libmysqlclient(){
   for dir in include libmysql libservices
   do
     make -C "${dir}" DESTDIR="${pkgdir}" install
   done
+  install -m 644 -D "${srcdir}/build/plugin/x/generated/mysqlx_ername.h" "${pkgdir}/usr/include/mysqlx_ername.h"
+  install -m 644 -D "${srcdir}/build/plugin/x/generated/mysqlx_error.h" "${pkgdir}/usr/include/mysqlx_error.h"
+  install -m 644 -D "${srcdir}/build/plugin/x/generated/mysqlx_version.h" "${pkgdir}/usr/include/mysqlx_version.h"

   install -m 755 -d "${pkgdir}/usr/bin"
   install -m 755 scripts/mysql_config "${pkgdir}/usr/bin/"
   install -m 755 -d "${pkgdir}/usr/share/man/man1"
@@ -153,8 +155,9 @@ package_mysql(){
   install -m 644 -D "${srcdir}/mysql-ld.so.conf" "${pkgdir}/etc/ld.so.conf.d/${pkgname}.conf"

   # provided by libmysqlclient
   rm "${pkgdir}/usr/bin/mysql_config"
+  rm "${pkgdir}/usr/lib/libmysqlclient.a"
   rm "${pkgdir}/usr/lib/libmysqlclient.so"
   rm "${pkgdir}/usr/lib/libmysqlclient.so.21"
   rm "${pkgdir}/usr/lib/libmysqlclient.so.21.1.17"
   rm "${pkgdir}/usr/lib/libmysqlservices.a"
@@ -166,23 +169,23 @@ package_mysql(){

   # provided by mysql-clients
   rm "${pkgdir}/usr/bin/mysql"
   rm "${pkgdir}/usr/bin/mysqladmin"
-  rm "${pkgdir}/usr/bin/mysqlbinlog"
   rm "${pkgdir}/usr/bin/mysqlcheck"
   rm "${pkgdir}/usr/bin/mysqldump"
   rm "${pkgdir}/usr/bin/mysqlimport"
   rm "${pkgdir}/usr/bin/mysqlshow"
   rm "${pkgdir}/usr/bin/mysqlslap"
-  rm "${pkgdir}/usr/bin/mysql_upgrade"
   rm "${pkgdir}/usr/share/man/man1/mysql.1"
   rm "${pkgdir}/usr/share/man/man1/mysqladmin.1"
-  rm "${pkgdir}/usr/share/man/man1/mysqlbinlog.1"
   rm "${pkgdir}/usr/share/man/man1/mysqlcheck.1"
   rm "${pkgdir}/usr/share/man/man1/mysqldump.1"
   rm "${pkgdir}/usr/share/man/man1/mysqlimport.1"
   rm "${pkgdir}/usr/share/man/man1/mysqlshow.1"
   rm "${pkgdir}/usr/share/man/man1/mysqlslap.1"
+
+  # deprecated
+  rm "${pkgdir}/usr/bin/mysql_upgrade"
   rm "${pkgdir}/usr/share/man/man1/mysql_upgrade.1"

   # not needed
   rm -r "${pkgdir}/usr/mysql-test"

FrederickZh commented on 2019-08-13 17:02

@Muflone Fair enough. Actually I didn't even know MySQL Shell existed until several days ago when I was googling about how connection URIs could be used for CLI. Hope it can get more traction in the future.

Btw, when I was scanning the files, I noticed that usr/lib/libmysqlclient.a is packed into mysql instead of libmysqlclient. Sorry if it's a stupid question but shouldn't it be in the latter?

Muflone commented on 2019-08-10 16:53

@FrederickZh I don't think it would be useful for mysql package users to download the source code for mysql-shell, build it and don't install it. It would cause a lot of unuseful work for a majority of users

FrederickZh commented on 2019-08-05 07:09

Sorry if this question has already been answered (I went through several pages of comments without finding any similar ones), but is it possible to ship mysql-shell with this package as well?

I just had a glance at the build instruction of mysql-shell and it seems that it requires both the source code of MySQL and the X protocol client library to compile (actually also the build directory of MySQL, but I suspect it's only needed to locate libmysqlclient and libmysqlxclient). In this case is it better to build MySQL Shell along with this package so that it could be easier to manage?

Muflone commented on 2019-08-04 22:25

@salifm did you bothered to read the error message? you have no space left in your file system

salifm commented on 2019-08-04 19:39

[ 89%] Linking CXX executable ../runtime_output_directory/mysqld /home/salif/.cache/yay/mysql/src/mysql-8.0.17/sql/parser_yystype.h:239:7: warning: type ‘union YYSTYPE’ violates the C++ One Definition Rule [-Wodr] 239 | union YYSTYPE { | ^ /home/salif/.cache/yay/mysql/src/mysql-8.0.17/storage/innobase/include/fts0pars.h:50: note: a different type is defined in another translation unit 50 | typedef union YYSTYPE | /home/salif/.cache/yay/mysql/src/mysql-8.0.17/sql/parser_yystype.h:240:17: note: the first difference of corresponding definitions is field ‘lexer’ 240 | Lexer_yystype lexer; // terminal values from the lexical scanner | ^ fts0pars.y:62: note: a field with different name is defined in another translation unit lto-wrapper: fatal error: write: No space left on device

compilation terminated. /usr/bin/ld.gold: fatal error: lto-wrapper failed collect2: error: ld returned 1 exit status make[2]: [sql/CMakeFiles/mysqld.dir/build.make:147: runtime_output_directory/mysqld] Error 1 make[1]: [CMakeFiles/Makefile2:7078: sql/CMakeFiles/mysqld.dir/all] Error 2 make: *** [Makefile:152: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting...

francoism90 commented on 2019-08-02 08:49

@tlo MySQL should now automatically upgrade:

https://mysqlserverteam.com/mysql-8-0-16-mysql_upgrade-is-going-away/

tlo commented on 2019-06-28 14:05

NVM: Upon further investigation I found this is a deprecated command my apologies for the useless comment.

I have just built mysql-8.0.16-1 and after installing I noticed mysql_upgrade was built (src/build/runtime_output_directory/mysql_upgrade) but was not installed to the system it appears to be missing from the pkg not sure if this is a bug or a strange fluke on my machine. In case it matters downloaded with yay -G aur/mysql and built with makepkg -si

Muflone commented on 2019-06-23 22:39

@francoism90

thank you for your precious work. I've integrated some of your fixes and changes. (now mysql builds fine with ccache)

francoism90 commented on 2019-06-14 12:12

@svenaugustus you need to recompile this package (MySQL) - don't know what lib(s) causing this issue. I recommend to reboot first before doing prior compiling.