**** GEQUEL: A GTK frontend for eg a MySQL database engine. **** **** (c) 2008 Kees Lemmens; TU Delft The Netherlands. **** **** Version 2.01 **** General: ======== The popular MySQL database engine is a simple but very robust database engine that is used in numerous WWW applications al around the world. The only problem is that it lacked (imo) a good and friendly user interface. A couple of years ago I wrote the Xsqlmenu GUI using the Xforms package to fill this gap for MSQL and later for MySQL (thanks to Stephen Wood !). From the large amount of responses I got all over the world I think I may say it indeed proved to be a useful tool in those days. However, the world has changed, Xforms is rather obscure nowadays, xsqlmenu had many flaws as users pointed out to me and it is also rather outdated now. For that reason I deciced to rewrite a new GUI from scratch and use Glade + GTK (currently 1.2) as the underlying graphics toolkit. As I consider xsqlmenu (and so gsqlmenu) a rather annoying name I also decided upon something more flashing (??) : GEQUEL !!! This program fits into my opinion that although Unix is a very powerful and reliable OS, it won't be able to hold against the pressure of less reliable systems if it doesn't come up with simple, user friendly interfaces (but fortunately a lot has changed in the last 5 years !) I hope this package can be of help to setup a reliable and easy to use database environment on Unix systems like Linux. WARNING: ======== This program is useless without having MySql running on one of your systems (not necessarily the same system as where you run Gequel !). The Mysql database software is available from most Linux software sites and is often already supplied with your Linux distribution. Installation: ============= The source code is available as gequel_xxxx.tar.gz and already contains a precompiled dynamically linked binary (except for the mysqlclient library that is statically linked) for Linux that should run on most 32-bit Intel based Linux systems. If desired I can supply a fully statically linked binary as well: drop me a note if you consider this necessary but realise that this will be a very large file. You only have to put the binary somewhere in your searchpath (for instance /usr/local/bin) and put the XML definition somewhere in the Gequel searchpath. Currently no other files are needed to run this program so a "make install" is not necessary. Just do as root : - mkdir -p /usr/local/{bin,etc} - cp gequel /usr/local/bin/gequel - chmod 755 /usr/local/bin/gequel - cp gequel.glade-3 mysql.xpm /usr/local/etc That should be enough to make it work ;-) If you really need or want to recompile : - unpack the source (eg in /tmp) - cd /tmp/gequel-2.x - check if the mysql path in src/Makefile.am is correct - ./autogen.sh - ./configure - make - and again as root : - mkdir -p /usr/local/{bin,etc} - cp gequel /usr/local/bin/gequel - chmod 755 /usr/local/bin/gequel - cp gequel.glade-3 mysql.xpm /usr/local/etc Alternatively you may invoke the "buildall.sh" script. NOTE: the GTK 2.0 libglade version is now the default and all support for Gtk1.x was dropped. If you do need Gtk 1.x support you have do download an older version of gequel. A few notes about usage: ======================== - Don't forget to select a MYSQL database server (if not selected it tries to connect to a server on the local host), a database and a table before starting to make any selections or else you won't be able to open any of the subwindows. ( The message: "Select a table first !" will appear in such cases) - The primary (sort) key field is shown in red, all others fields in black or blue. The sort key can be changed by clicking on the new key field in the Fields tab. - It is no problem to have records open from different tables at the same time. But, if you select a new database it will be impossible to modify or select records from windows that belong to the previous database. If you want to update or modify those records you should simply reselect the old database and the previous connection will be re-established. - If you select a record from the browser and modify or delete it, the browser will be updated automatically with the new information, unless you turn this behaviour of. Note that this behaviour can be suppressed in the Settings menu : convenient while editing many records and you don't want gequel to reload the browser everytime (thereby losing your last cursor position). - If you use the new Copy Record function : if used from the browser it will copy the ORIGINAL database contents to the copied record window, but if you use it from another record window it will copy the ACTUAL data from that window !!! - It is a very good idea to have in each table a field that serves as a Unique Primary key to avoid problems and confusion. Commandline options : ===================== Usage : ./gequel [options] [ []] Options: -h : set optional remote database server -u : change (MySQL) userid -k : supply (MySQL) password -c : disable record count (saves some time for large tables) Troubleshooting/FAQ: ==================== 1) If you run the binary from the distribution and get a message like : "Can't connect to local MySQL server through socket /xyz/whereever.sock" this means that your local Mysql server listens to a different socket than the one for which the binary was compiled or that you don't have any MySql daemon running at all. You can solve this problem in 3 ways (provided you know mysql is indeed running on your system): a) Find out the local socket name (on Redhat /var/lib/mysql/mysql.sock) and put that one in an environment variable before starting Gequel : prompt % export MYSQL_UNIX_PORT=/var/lib/mysql/mysql.sock # (for Bash) prompt % gequel b) Connect to the TCP server socket instead of the Unix socket on your server (provided your mysql was setup to allow network access !) by using the -h option of gequel : - gequel -h localhost c) Recompile the whole bunch from source. It will pickup your local MySql settings and the new binary will be fine for your setup. 2) ..... Differences between gequel and the older xsqlmenu : =================================================== - Has new Copy and Restore Record functions - Only uses one single Browser which is integrated in the main GUI - Query window integrated in main GUI - Browser doesn't have the record in one single entry but uses separate columns for each field (much like a spreadsheet). - Primary key can be changed as well (in fact it doesn't even use the concept of a primary key anymore except for sorting) - Now passes ALL (old) field values in every SQL statement for an UPDATE or DELETE action. This is because nowadays many databases (unfortunately ?) do not contain any primary or unique key(s) anymore and in this way we assure the combination is as unique as possible. Comments: ========= - If you have any comments, found any bugs or just want some extra features to be added: write me an email and I'll see what I can do. lemmenskeesyahoocouk