mysql-workbench on RHEL or SL 7.x with STAR db servers

A few notes here on restoring Leve's access to the scheduler database on duvall.star.bnl.gov after moving duvall to the Science DMZ (130.199.148.0/24).

Leve has historically used the mysql-workbench GUI on his desktop computer (caine2.star.bnl.gov at the moment) to look at the scheduler database on duvall.   Duvall's mysql server has an ACL that uses FQDN (with wildcards such as *.star.bnl.gov for instance). The problem comes up after changing duvall's IP addres because the DNS servers used in the Science DMZ do not generally have records for the main campus, so duvall cannot get an IP name to go with caine2's IP address, thus duvall's MySQL server rejects the connection from Leve's computer. This could have been resolved rather quickly in several ways such as :
  • adding Leve's IP numerical address (130.199.16.150 or a wildcard like 130.199.16.0) to the MySQL ACL (Dmitry A. would do this)
  • adding the 130.199.16.150 DNS record to be seen within the SciDMZ (Mark L./ ITD would do this)
  • adding "130.199.16.150 caine2.star.bnl.gov" to the /etc/hosts file on duvall (which I actually did, having thought of it only after a ridiculously long time (1-2 days!) once this came up)
Another alternative that turned out not to be a quick fix was to install the mysql-workbench on a machine such as stargrid01 that Leve has access to, and which duvall can be recognize by IP name.  At first glance, this seemed trivial -- after all, Oracle/MySQL provides RPMs for mysql-workbench-community specifically for RHEL 7 -- how hard could it be?  Well, the first issue is that the latest version of mysql-workbench-community (6.3.10-1) does not support a legacy authentication method that is still in use on duvall, so it won't connect at all.  Reverting to version 6.3.4-1 resolves this, as it still supports the legacy authentication (activated under the advanced tab in the connection setup window). 

Ok, that's that, problem solved, right?   NO!  Unfortunately, a change in glib (made in version 2.41 or 2.42) causes a display problem in the Results Grid in this older version of the workbench used on an up-to-date RHEL 7 installation, making it essentially useless for Leve.  There is some discussion of this issue (and a patch for mysql-workbench source code) at https://bugs.mysql.com/bug.php?id=74147.  I made an attempt to compile the mysql-workbench from source, hoping that I could then just apply the rather trivial patch (attached as glib.diff at the link above) and be done with this.  But after several hours making progress by tracking down dependencies and configuration issues, I hit a point where I had no idea how to proceed and am giving up on that path, having found an alternative...

So, to get the workbench working on stargrid01, I downloaded the glib2-2.40.0-4 rpm (along with glibmm24-2.36.2-4.el7, gtk2-2.24.22-5.el7_0.1, and gtkmm24-2.24.2-8.el7 necessary for consistency) from a Scientific Linux 7.1 repository and extracted the contents in /opt/mysql-workbench-gtk-libs.    Now one can start the workbench (and see query results!) using an LD_LIBRARY_PATH thus (assuming csh/tcsh):
[stargrid01] ~/> env LD_LIBRARY_PATH=/opt/mysql-workbench-gtk-libs/usr/lib64 mysql-workbench & 

There could be other problems resulting from this hybrid library configuration, but so far it seems useful.