Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mysql-workbench : patched workbenches 6.3.4 - 8.0.22
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
lanthruster
n00b
n00b


Joined: 01 Jan 2012
Posts: 60

PostPosted: Sun Jan 17, 2021 9:23 pm    Post subject: mysql-workbench : patched workbenches 6.3.4 - 8.0.22 Reply with quote

MYSQL-WORKBENCH was removed from the Gentoo official portage, this article provides a solution to help building all the workbenches starting from 6.3.4 and finishing with 8.0.22. They will build and work with the current Gentoo, boost & gcc

First of all download dev-db from http://files.healtech.ru/mysql-workbench.tar.gz in this archive you will find ebuilds with patches. Some of the patches
are mine some were taken from the 3rd parties

Code:

mysql
mysql-connector-c++
mysql-workbench


in the same archive you'll find mysql-5.6.35.ebuild with patches it will all so build and work against the current gentoo

First create a local repository. I won't cover in this article how to do it, but having a local repository is essential in many tweaks.
Place the ebuilds in the local repository into dev-db folder.

Installation notes

1. Oracle messed with mysql and a lot of changes were introduced including missing mysql.h and other mysql headers
which were earlier available for decades. All so some bright head in Oracle removed my_bool type which was with mysql for as long as I can remember and that all led to some incompatibilities with the current gcc and older packages. You have to follow these instructions exactly to make things work.

2. In the archive above you will find ebuilds which will allow you to build mysql-5.6.35 server with mysql-workbenches including mysql-workbench-6.3.4 which is compatible with OLDER mysql servers. You will be able to manage 5.0.x to 5.7.x servers with workbenches 6.3.4-6.3.10. Which is the majority of all our needs at the moment. You will all so be able to work with mysql 8.0 with the same package above but you will loose mysq versions below 5.6.0 compatibility. In other words, there are two setups. In the first setup you will be able to mange 5.0.x - 5.7.x servers and in the other setup 5.6.x - to the present versions. Both are not possible (although you may try to install mysql-workbench 8.x with the old connectors and it might work with mysql 8.0 servers with limited functionality, some functions will not be available). I went with the first setup as I don't need mysql 8.0 support. But I all so checked out the new connectors and mysq-workbench-8.0.x with the patches included in the gz file will compile install and work with mysql-severs 5.6.x - to the present.

3. Setup to mange mysql servers 5.0.x - 5.7.x

With this setup you will need to install mysql-5.6.35.ebuild and mysql-connector-c++-1.1.6.ebuild In this config all 6.3.4 - 6.3.10 workbenches from the archive will be able to connect to mysql server 5.0.x - 6.6.x Please note that you shouldn't install mysql-connector-c in this setup as it was part of mysql in those days (which was right thing to do, but things changed)

steps to follow and their order:

* install mysq-5.5.35.ebuild (will be installed with mysql-connector-c)
* install mysql-connector-c++-1.1.6.ebuild
* install any of mysql-workbenches-6.x.x (I recommend 6.3.4-r3 - it's been extensively tested, but all of 6.3.x will compile install and work)

4. Setup to mange mysql servers 5.6.x - to the present

steps to follow

* install mysql from the current gentoo tree
* install mysql-connector-c from the current gentoo tree
* install mysql-connectro-c++ from the current gentoo tree
* install any of myslq-workbench-8.x.x from the package above (I recommend 8.0.22)

can you have both workbenches 8.x.x and 6.x.x - the answer is NO mysql-workbench has a poor design which will not allow you to have them both

mysql-workbench is not responsible for connecting to mysql server, it's done via C++ and C connectors which in turn rely on the currently installed mysql libraries. So you have to consider mysql + connectors + workbench as a single environment.

5. Customs setups

"mysql-connector-c++-1.1.9.ebuild" "mysql-connector-c++-1.1.8.ebuild" will likely work with mysq 5.6.35 and mysql 5.7.x and workbench 6.x,
if you want to stick with 6.x.x workbench and have the latest mysql server possible you should likely go with some of 5.7.17 or other later mysql server. You need to check the presence of my_bool in mysql headers and that mysql headers are installed with the mysql server into /usr/include/mysql

If no my_bool is present you will have problems with connectors and mysql-workbench eventually. I believe the problems are solvable but you will need new patches.

mysql-connector-c++-1.1.12 and above will not be compatible with workbench 6.3.x do not install it or it will stop working, to be exact workbenches 6.3.x will still work but will loose the ability to connect to the older mysql servers - they will throw 'Bad Handshake' when you try connecting to them.

If you had mysql installed earlier, after installing mysql and connectors see what apps depend on mysql

equery hasuses mysql

and rebuild all that packages. They will all work against the the old mysqlconnector-c and mysql-connector-c++

now mask mysqlconnector-c, mysql server, mysql-connector-c++ and mysql-workbench above versions you installed so no emerge would mess with your setup, you don't want some update to pull in the new connectors or mysql-server and workbench would stop working. Just keep it happily this way.


And the last. To make some ebuilds build I added mysql headers which were removed from the recent mysql. The headers in the above package are from mysql-5.3.35. If you plan to try some other mysql version and some mysql-connectors first take a look inside the ebuilds. If you see something like
Code:

   cp "${FILESDIR}/mysql.h" "${WORKDIR}/${P}/driver/nativeapi/"
   cp "${FILESDIR}/mysql_com.h" "${WORKDIR}/${P}/driver/nativeapi/"
   cp "${FILESDIR}/mysql_time.h" "${WORKDIR}/${P}/driver/nativeapi/"
   cp "${FILESDIR}/typelib.h" "${WORKDIR}/${P}/driver/nativeapi/"
   cp "${FILESDIR}/my_alloc.h" "${WORKDIR}/${P}/driver/nativeapi/"



then it means that mysq 5.6.35 headers are going to be injected. That might break your mysql - conector-c-connector-c++-workbench environment. To fix it first see if your mysql has headers above installed in /usr/include/mysql if no headers installed then you're on sandy ground. I wouldn't go with these mysql servers if I wanted to keep mysql-workbench ability to connect to mysql servers below 5.6.0

I added these to make the older connectors to compile against the mysql servers which do not install the headers, and these headers are from 5.6.35.
If you use mysq-5.6.35 you don't need them. So comment them out. If you use other mysql, like 5.7 you might consider two options - either try keeping
the headers from 5.6.35 or comment these lines and use headers from 5.7. That might break the connectors. But you might experiment with different mysql servers/headers/connector version. The breakage means that the connectors will either not build or when you launch mysql-workbench and try connecting to a server you won't be able to establish the connection with various messages. If you see "Bad handshake" the problem is that the connectors
are incompatible with mysql version you're connecting. If you see something like "bad number of arguments are provided to mysql_getopts4" - that means you have a problem with mysql-connector-c, mysql-connector-c++ and your mysql server. They're either not compatible or built with different headers.

It's possible that mysql-workbench-8.0.x with the setup from the paragraph 3 will work with 5.0.x - 5.6.0 (and earlier) severs. I saw that mysql announced that support of 5.1 is dropped starting from mysql-workbench 6.3.8 but I at the moment of writing have workbench 6.3.10 connected to mysql 5.0.x sever and it WORKS flawlessly with the current gentoo. So may be even 8.x.x will work with the old mysql servers and may be even with mysql-8.0
(although with some functionality loss I guess and if the backward compatibility is provided)

PS I just checked the idea that mysql-workbench-8.0.xx might work with the old connectors and connect to the old servers and the answer is NO. It won't link against them and requires new patches.

But the good news that you might have the latest workbench 6.3.10 full functional, at least I'm testing it now against the old 5.0.x mysql server and the relatively new servers - so far it's working, including management.

To conclude this article:

I extensively tested 6.3.4 against the old mysql servers (5.0.x and below) and new servers : it's stable will work fine
workbenches 6.3.5 - 6.3.10 will build and work out of the gz above, against old and new servers, but I didn't have yet enough time yet to test all of their functionality. Officially even 5.1 support was dropped starting from workbench 6.3.8 but practically although you will see a warning that you're connecting to unsupported mysql server (Press continue button in this case) in the beginning - even 6.3.10 will work with the old severs if you follow paragraph 3.
Back to top
View user's profile Send private message
lanthruster
n00b
n00b


Joined: 01 Jan 2012
Posts: 60

PostPosted: Mon Mar 15, 2021 1:47 pm    Post subject: Reply with quote

Recent portage broke single python2_7 required for mysqlworkbench the affected class : /eclass/python-utils-r1.eclass
if you see
Code:

 * ERROR: dev-db/mysql-workbench-6.3.4-r2::local failed (depend phase):
 *   No supported implementation in PYTHON_COMPAT.
 *
 * Call stack:
 *                         ebuild.sh, line 609:  Called source '/var/db/repos/local/dev-db/mysql-workbench/mysql-workbench-6.3.4-r2.ebuild'
 *   mysql-workbench-6.3.4-r2.ebuild, line  10:  Called inherit 'gnome2' 'eutils' 'flag-o-matic' 'python-single-r1' 'cmake-utils'
 *                         ebuild.sh, line 314:  Called __qa_source '/var/db/repos/local/eclass/python-single-r1.eclass'
 *                         ebuild.sh, line 112:  Called source '/var/db/repos/local/eclass/python-single-r1.eclass'
 *           python-single-r1.eclass, line 262:  Called _python_single_set_globals
 *           python-single-r1.eclass, line 179:  Called _python_set_impls
 *            python-utils-r1.eclass, line 156:  Called die
 * The specific snippet of code:
 *                      die "No supported implementation in PYTHON_COMPAT."
 *
 * If you need support, post the output of `emerge --info '=dev-db/mysql-workbench-6.3.4-r2::local'`,
 * the complete build log and the output of `emerge -pqv '=dev-db/mysql-workbench-6.3.4-r2::local'`.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-workbench-6.3.4-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-db/mysql-workbench-6.3.4-r2/homedir'
 * S: '/var/tmp/portage/dev-db/mysql-workbench-6.3.4-r2/work/mysql-workbench-6.3.4'
!!! getFetchMap(): aux_get() error reading dev-db/mysql-workbench-6.3.4-r2; aborting.


then either copy the old version of python-single-r1.eclass from here http://files.healtech.ru/python-utils-r1.eclass
or open python-utils-r1.eclass and add python2_7 into _PYTHON_ALL_IMPLS so it would look like

Code:

_PYTHON_ALL_IMPLS=(
   pypy3
   python2_7
   python3_6 python3_7 python3_8 python3_9
)

[/code]
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2727

PostPosted: Mon Mar 15, 2021 2:00 pm    Post subject: Reply with quote

Note that mysql-workbench-8 was re-added to ::gentoo last month, not that this will help if need a older version.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum