File: query-browser.html

package info (click to toggle)
mysql-gui-tools 5.0r14%2BopenSUSE-2.1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 116,956 kB
  • ctags: 48,715
  • sloc: sql: 341,918; pascal: 276,698; ansic: 91,020; cpp: 90,451; objc: 33,236; sh: 29,481; yacc: 10,756; xml: 10,589; java: 10,079; php: 2,806; python: 2,092; makefile: 1,783; perl: 4
file content (2040 lines) | stat: -rw-r--r-- 133,763 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>
  MySQL Query Browser
 </title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="mysql-query-browser"></a>
   MySQL Query Browser
  </h1></div><div><p class="copyright">Copyright  2004 MySQL AB</p></div><div><div class="legalnotice"><p>
    This manual is NOT distributed under a GPL style license. Use of the
    manual is subject to the following terms:

    </p><div class="itemizedlist"><ul type="disc"><li><p>
      Conversion to other formats is allowed, but the actual content may
      not be altered or edited in any way.
     </p></li><li><p>
      You may create a printed copy for your own personal use.
     </p></li><li><p>
      For all other uses, such as selling printed copies or using (parts
      of) the manual in another publication, prior written agreement
      from MySQL AB is required.
     </p></li></ul></div><p>

    Please email docs@mysql.com for more information or if you are
    interested in doing a translation.
   </p></div></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#mysql-query-browser-introduction">1. 
   Introduction to the MySQL Query Browser
  </a></span></dt><dt><span class="chapter"><a href="#mysql-query-browser-installation">2. 
   Installing MySQL Query Browser
  </a></span></dt><dd><dl><dt><span class="sect1"><a href="#mysql-query-browser-installation-introduction">2.1. 
    Introduction
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-installation-windows">2.2. 
    Installing Under Windows
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-installation-linux">2.3. 
    Installing Under Linux
   </a></span></dt></dl></dd><dt><span class="chapter"><a href="#mysql-query-browser-starting">3. 
   Starting MySQL Query Browser
  </a></span></dt><dd><dl><dt><span class="sect1"><a href="#mysql-query-browser-starting-introduction">3.1. 
    Introduction
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-starting-connection">3.2. 
    Connection Dialog
   </a></span></dt></dl></dd><dt><span class="chapter"><a href="#mysql-query-browser-tour">4. 
   A Tour of the MySQL Query Browser
  </a></span></dt><dd><dl><dt><span class="sect1"><a href="#mysql-query-browser-tour-mainwindow">4.1. 
    The Main Query Window
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-tour-querybar">4.2. 
    The Query Toolbar
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#mysql-query-browser-tour-querybar-navigation">4.2.1. 
     The Navigation Buttons
    </a></span></dt><dt><span class="sect2"><a href="#mysql-query-browser-tour-querybar-queryarea">4.2.2. 
     The Query Area
    </a></span></dt><dt><span class="sect2"><a href="#mysql-query-browser-tour-querybar-actionbuttons">4.2.3. 
     The Action Buttons
    </a></span></dt></dl></dd><dt><span class="sect1"><a href="#mysql-query-browser-tour-buttonbar">4.3. 
    The Advanced Toolbar
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-tour-resultarea">4.4. 
    The Result Area
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-tour-objectbrowser">4.5. 
    The Object Browser
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#mysql-query-browser-tour-objectbrowser-schemata">4.5.1. 
     The Database Browser
    </a></span></dt><dt><span class="sect2"><a href="#mysql-query-browser-tour-objectbrowser-bookmarks">4.5.2. 
     The Bookmark Browser
    </a></span></dt><dt><span class="sect2"><a href="#mysql-query-browser-tour-objectbrowser-history">4.5.3. 
     The History Browser
    </a></span></dt></dl></dd><dt><span class="sect1"><a href="#mysql-query-browser-tour-pandf">4.6. 
    The Parameter and Syntax Browser
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#mysql-query-browser-tour-pandf-parameterbrowser">4.6.1. 
     The Parameter Browser
    </a></span></dt><dt><span class="sect2"><a href="#mysql-query-browser-tour-pandf-syntaxbrowser">4.6.2. 
     The Syntax Browser
    </a></span></dt><dt><span class="sect2"><a href="#mysql-query-browser-tour-pandf-functionbrowser">4.6.3. 
     The Function browser
    </a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#mysql-query-browser-using">5. 
   Using The MySQL Query Browser
  </a></span></dt><dd><dl><dt><span class="sect1"><a href="#mysql-query-browser-using-manualentry">5.1. 
    Entering and Editing Queries Manually
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-graphicalbuilding">5.2. 
    Building Queries Visually
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-navigatingtabsheet">5.3. 
    Navigating Result Sets Within the Result Area
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-export">5.4. 
    Exporting Result Sets
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-blobs">5.5. 
    Handling BLOB and TEXT Columns
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-editingtabsheet">5.6. 
    Editing Result Sets Within the Result Area
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-compare">5.7. 
    Comparing Result Sets
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-masterdetail">5.8. 
    Creating Master-Detail Views
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-codeedit">5.9. 
    Editing Queries From a Development Tool
   </a></span></dt></dl></dd><dt><span class="chapter"><a href="#gui-table-editor">6. 
   The MySQL Table Editor
  </a></span></dt><dd><dl><dt><span class="sect1"><a href="#gui-table-editor-introduction">6.1. 
    Introduction
   </a></span></dt><dt><span class="sect1"><a href="#gui-table-editor-main-window">6.2. 
    The Main Editor Window
   </a></span></dt><dt><span class="sect1"><a href="#gui-table-editor-columns-and-indices">6.3. 
    The Columns And Indices Tab
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#gui-table-editor-columns-and-indices-column-editor">6.3.1. 
     The Column Editor
    </a></span></dt><dt><span class="sect2"><a href="#gui-table-editor-columns-and-indices-detail">6.3.2. 
     The Detail Area
    </a></span></dt></dl></dd><dt><span class="sect1"><a href="#gui-table-editor-Table-Options">6.4. 
    The Table Options Tab
   </a></span></dt><dt><span class="sect1"><a href="#gui-table-editor-advanced-options">6.5. 
    The Advanced Options Tab
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#gui-table-editor-advanced-options-various">6.5.1. 
     The Various Section
    </a></span></dt><dt><span class="sect2"><a href="#gui-table-editor-advanced-options-row-options">6.5.2. 
     The Row Options Section
    </a></span></dt><dt><span class="sect2"><a href="#gui-table-editor-advanced-options-storage-options">6.5.3. 
     The Storage Options Section
    </a></span></dt><dt><span class="sect2"><a href="#gui-table-editor-advanced-options-merge-options">6.5.4. 
     The Merge Table Options Section
    </a></span></dt><dt><span class="sect2"><a href="#gui-table-editor-advanced-options-raid-options">6.5.5. 
     The Table RAID Settings Section
    </a></span></dt></dl></dd><dt><span class="sect1"><a href="#gui-table-editor-changes">6.6. 
    Applying Your Changes
   </a></span></dt></dl></dd><dt><span class="chapter"><a href="#mysql-gui-options">7. 
 Options Dialog
</a></span></dt><dd><dl><dt><span class="sect1"><a href="#mysql-gui-options-introduction">7.1. 
  Introduction
 </a></span></dt><dt><span class="sect1"><a href="#mysql-gui-options-general-options">7.2. 
  General Options
 </a></span></dt><dt><span class="sect1"><a href="#mysql-gui-options-connections">7.3. 
  Connections
 </a></span></dt><dt><span class="sect1"><a href="#mysql-gui-options-editors">7.4. Editors</a></span></dt><dt><span class="sect1"><a href="#gui-options-query-browser">7.5. 
  The Browser Section
 </a></span></dt><dd><dl><dt><span class="sect2"><a href="#gui-options-query-browser-display-options">7.5.1. 
   Display Options
  </a></span></dt><dt><span class="sect2"><a href="#gui-options-query-browser-query-options">7.5.2. 
   Query Options
  </a></span></dt><dt><span class="sect2"><a href="#gui-options-query-browser-various">7.5.3. 
   Various
  </a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="#mysql-gui-install-source">A. Installing From Source</a></span></dt><dd><dl><dt><span class="sect1"><a href="#mysql-gui-install-source-introduction">A.1. Introduction</a></span></dt><dt><span class="sect1"><a href="#mysql-gui-install-source-download">A.2. Downloading The Source Code</a></span></dt><dt><span class="sect1"><a href="#mysql-gui-install-source-windows">A.3. 
    Building from Source under Windows
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#mysql-gui-install-source-windows-prerequisites">A.3.1. 
     Prerequisites
    </a></span></dt><dt><span class="sect2"><a href="#mysql-gui-install-source-windows-compiling">A.3.2. 
     Compiling and Building
    </a></span></dt></dl></dd><dt><span class="sect1"><a href="#mysql-gui-install-source-linux">A.4. 
    Building from Source under Linux
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#mysql-gui-install-source-linux-prerequisites">A.4.1. 
     Prerequisites
    </a></span></dt><dt><span class="sect2"><a href="#mysql-gui-install-source-linux-compiling">A.4.2. 
     Compiling and Building
    </a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="#mysql-gui-appendix-troubleshooting">B. 
  Troubleshooting Application Errors
 </a></span></dt><dd><dl><dt><span class="sect1"><a href="#mysql-gui-appendix-troubleshooting-connection-errors">B.1. 
   Troubleshooting Connection Errors
  </a></span></dt><dt><span class="sect1"><a href="#mysql-gui-appendix-troubleshooting-display-problems">B.2. 
   Troubleshooting Display Problems
  </a></span></dt></dl></dd><dt><span class="appendix"><a href="#mysql-gui-appendix-store-connections">C. 
  How Connections Are Stored
 </a></span></dt><dt><span class="appendix"><a href="#mysql-gui-appendix-xml-files">D. 
  XML Files Common to the MySQL GUI Applications
 </a></span></dt><dt><span class="appendix"><a href="#mysql-query-browser-appendix-xml-files">E. 
   XML Files Used by MySQL Query Browser
  </a></span></dt><dt><span class="appendix"><a href="#mysql-gui-appendix-notes-for-translators">F. 
  Notes for Translators
 </a></span></dt><dt><span class="appendix"><a href="#mysql-gui-appendix-third-party-software">G. 
  Third-party Software Used by the MySQL GUI Tools
 </a></span></dt><dd><dl><dt><span class="sect1"><a href="#mysql-gui-appendix-third-party-software-pcre">G.1. 
   PCRE Library
  </a></span></dt><dt><span class="sect1"><a href="#mysql-gui-appendix-third-party-software-png">G.2. 
   PNG Support
  </a></span></dt></dl></dd></dl></div><div class="list-of-figures"><p><b>List of Figures</b></p><dl><dt>3.1. <a href="#id4674368">
     Connection dialog
    </a></dt><dt>4.1. <a href="#id4674640">
     The MySQL Query Browser main query window
    </a></dt><dt>4.2. <a href="#id4738161">
      The query area expanded to ten lines
     </a></dt><dt>4.3. <a href="#id4738422">
      The MySQL Query Browser status icons
     </a></dt><dt>4.4. <a href="#id4738483">
     The advanced toolbar
    </a></dt><dt>4.5. <a href="#id4738726">
      The database browser
     </a></dt><dt>5.1. <a href="#id4739294">
     The table tool
    </a></dt><dt>5.2. <a href="#id4739730">
     The BLOB handling icons
    </a></dt><dt>5.3. <a href="#id4740131">
     The dynamic parameter list
    </a></dt><dt>6.1. <a href="#id4740951">
     The MySQL Table Editor
    </a></dt><dt>6.2. <a href="#id4741062">
      The column editor
     </a></dt><dt>6.3. <a href="#id4741176">
       The index editor
      </a></dt><dt>6.4. <a href="#id4741826">
     The Confirm Table Edit dialog
    </a></dt><dt>7.1. <a href="#id4743064">
    Options dialog
   </a></dt><dt>7.2. <a href="#id4743394">
   Options dialog: Connections
  </a></dt><dt>B.1. <a href="#id4747174">
    Error message dialog
   </a></dt></dl></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="mysql-query-browser-introduction"></a>Chapter1.
   Introduction to the MySQL Query Browser
  </h2></div></div><div></div></div><p>
   The MySQL Query Browser is a graphical tool provided by MySQL AB for
   creating, executing, and optimizing queries in a graphical
   environment. Where the
   <a href="http://www.mysql.com/products/administrator/" target="_top">MySQL
   Administrator</a> is designed to administer a MySQL server, the
   MySQL Query Browser is designed to help you query and analyze data stored
   within your MySQL database.
  </p><p>
   While all queries executed in the MySQL Query Browser could also be
   performed in the <span><b class="command">mysql</b></span> command-line utility, the
   MySQL Query Browser allows for the querying and editing of data in a more
   intuitive, graphical manner.
  </p><p>
   MySQL Query Browser is designed to work with MySQL versions 4.0 and
   higher.
  </p><p>
   MySQL Query Browser is to a large extent the result of feedback MySQL AB
   has received from many users over a period of several years. However,
   if you find it's lacking some feature important to you, or if you
   discover a bug, please use our
   <a href="http://bugs.mysql.com" target="_top">MySQL Bug System</a> to
   request features or report problems.
  </p></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="mysql-query-browser-installation"></a>Chapter2.
   Installing MySQL Query Browser
  </h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#mysql-query-browser-installation-introduction">2.1. 
    Introduction
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-installation-windows">2.2. 
    Installing Under Windows
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-installation-linux">2.3. 
    Installing Under Linux
   </a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-installation-introduction"></a>2.1.
    Introduction
   </h2></div></div><div></div></div><p>
    The MySQL Query Browser is available for both Windows and Linux, in
    source and binary forms. MySQL Query Browser can be downloaded from
    <a href="http://dev.mysql.com/downloads/query-browser/" target="_top">The
    MySQL web site.</a>
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-installation-windows"></a>2.2.
    Installing Under Windows
   </h2></div></div><div></div></div><p>
    MySQL Query Browser runs on 32-bit Windows operating systems, including
    Windows 95, 98, Me, NT, 2000, and XP.
   </p><p>
    MySQL Query Browser is installed through the use of a Windows Installer
    (<tt class="literal">.msi</tt>) installation package, which can be used on
    all Windows operating systems. The MSI package in contained within
    an archive named
    <tt class="literal">mysql-query-browser-<i class="replaceable"><tt>version</tt></i>-win.zip</tt>,
    where <i class="replaceable"><tt>version</tt></i> indicates the
    MySQL Query Browser version. Download the ZIP file, extract it and
    change into the directory you extracted it into.
   </p><p>
    The Windows Installer system was updated with the release of Windows
    XP; those using an older version of Windows can reference
    <a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;292539" target="_top">this
    Microsoft Knowledge Base article</a> for information on
    upgrading to the latest version.
   </p><p>
    To install MySQL Query Browser, right-click on the MSI file and select
    <span class="guimenu">Install</span>. The installation will begin
    automatically after the installer prompts you for your installation
    preferences. During installation, you can choose whether you want
    the installer to place a shortcut in the <tt class="literal">Start</tt>
    menu and an icon on the desktop.
   </p><p>
    If you are having problems running the installer, you can download a
    ZIP file without an installer as an alternative. That file is called
    <tt class="literal">mysql-query-browser-<i class="replaceable"><tt>version</tt></i>-win-noinstall.zip</tt>.
    Using a ZIP program, unpack it to a directory of your choice. You
    may want to create shortcuts to
    <tt class="literal">MySQLQueryBrowser.exe</tt> for your desktop or quick
    launch bar.
   </p><p>
    Unless you choose otherwise, MySQL Query Browser is installed in
    <tt class="literal">C:\<i class="replaceable"><tt>%PROGRAMFILES%</tt></i>\MySQL\GUITools\MySQL Query Browser\MySQLQueryBrowser.exe</tt>,
    where <i class="replaceable"><tt>%PROGRAMFILES%</tt></i> is the default
    directory for programs on your machine. For example, this directory
    might be <tt class="literal">C:\Program Files</tt> or
    <tt class="literal">C:\programme</tt>.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-installation-linux"></a>2.3.
    Installing Under Linux
   </h2></div></div><div></div></div><p>
    MySQL Query Browser runs on Linux machines that have a graphical desktop
    installed. It is designed to run under the Gnome desktop, but you
    may also use other desktops, such as KDE, as long as GTK2 is
    installed. It has been tested on Linux kernel versions 2.4 and 2.6,
    but it should also run on other versions, and even on a number of
    Unix-like operating systems.
   </p><p>
    To install MySQL Query Browser, first download the installation tarball.
    The tarball file is called
    <tt class="literal">mysql-query-browser-<i class="replaceable"><tt>version</tt></i>-linux.tar.gz</tt>,
    where <i class="replaceable"><tt>version</tt></i> indicates the
    MySQL Query Browser version (for example 1.0.5-alpha).
   </p><p>
    To see all files in the tarball, run this command:

</p><pre class="programlisting">
    
    shell&gt; tar -tzf  mysql-query-browser-<i class="replaceable"><tt>version</tt></i>-linux.tar.gz
   </pre><p>
   </p><p>
    To install MySQL Query Browser, run this command:

</p><pre class="programlisting">
    
    shell&gt; tar --directory=<i class="replaceable"><tt>/opt</tt></i> -xzvf mysql-query-browser-<i class="replaceable"><tt>version</tt></i>-linux.tar.gz
   </pre><p>
   </p><p>
    This installs the application binary in
    <tt class="literal">/opt/mysql-query-browser/bin</tt>. Change into that
    directory and run <tt class="literal">mysql-query-browser</tt> to start
    the application. You can replace <i class="replaceable"><tt>/opt</tt></i>
    with your desired installation path.
   </p><p>
    Distribution-specific packages will be available at some point.
   </p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="mysql-query-browser-starting"></a>Chapter3.
   Starting MySQL Query Browser
  </h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#mysql-query-browser-starting-introduction">3.1. 
    Introduction
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-starting-connection">3.2. 
    Connection Dialog
   </a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-starting-introduction"></a>3.1.
    Introduction
   </h2></div></div><div></div></div><p>
    The way you start MySQL Query Browser depends on the operating system
    you are using:

    </p><div class="itemizedlist"><ul type="disc"><li><p>
      On Windows, start MySQL Query Browser by double-clicking its desktop
      icon, or by selecting its entry from the <tt class="literal">Start</tt>
      menu (typically the <span class="guimenu">MySQL Query Browser</span> entry of
      the <span class="guimenu">MySQL</span> section of the
      <tt class="literal">Start</tt> menu). Alternatively, you can open a DOS
      window and start the MySQL Query Browser from the command line:

</p><pre class="programlisting">
C:\<i class="replaceable"><tt>%PROGRAMFILES%</tt></i>\MySQL\GUITools\MySQLQueryBrowser.exe
</pre><p>

      <i class="replaceable"><tt>%PROGRAMFILES%</tt></i> is the default directory
      for programs on your machine. For example, <tt class="literal">C:\program
      files</tt> or <tt class="literal">C:\programme</tt>. If your path
      contains spaces, you should enclose the command within double
      quotes. For example:

</p><pre class="programlisting">

C:\&gt; "C:\program files\MySQL\GUITools\MySQLQueryBrowser.exe" 

</pre><p>
     </p></li><li><p>
      On Linux desktops, start MySQL Query Browser by changing directories
      into <tt class="literal">/opt/mysql-query-browser/bin</tt>, and then
      executing <tt class="literal">mysql-query-browser</tt>.
     </p></li></ul></div><p>
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-starting-connection"></a>3.2.
    Connection Dialog
   </h2></div></div><div></div></div><p>
    Once MySQL Query Browser has been started, it displays a connection
    dialog. You have to specify the MySQL server to which you would like
    to connect, the credentials needed for authorization on that server,
    which machine that server runs on (and which port it listens to),
    and the default database (Schema) you will be querying from. You may
    also specify a number of other options, if required.
   </p><p>
    <span class="emphasis"><em>You must choose a default database in order to issue
    queries.</em></span> It is possible to choose a default database
    after connecting to the server, but setting the default from the
    connection dialog can save time on subsequent connections.
   </p><div class="figure"><a name="id4674368"></a><p class="title"><b>Figure3.1.
     Connection dialog
    </b></p><div><img src="images/connection.png" alt="Connection dialog"></div></div><p>
    If the server connection is successfully established, all of the
    values filled in the fields of the connection dialog is saved for
    future connections (see the section that describes
    <a href="#mysql-gui-appendix-store-connections" title="AppendixC.
  How Connections Are Stored
 "> how
    MySQL Query Browser stores connection information</a>). The
    <tt class="literal">Password</tt> field, however, is always empty: For
    security reasons, the password is not stored along with the other
    options, unless you explicitly specify otherwise in the
    <a href="#mysql-gui-options-general-options" title="7.2.
  General Options
 ">General
    Options</a> section of the
    <a href="#mysql-gui-options" title="Chapter7.
 Options Dialog
">Options dialog</a>.
   </p><p>
    If you have difficulties connecting, please see the
    <a href="#mysql-gui-appendix-troubleshooting-connection-errors" title="B.1.
   Troubleshooting Connection Errors
  ">Troubleshooting
    Connection Errors</a> section in the
    <a href="#mysql-gui-appendix-troubleshooting" title="AppendixB.
  Troubleshooting Application Errors
 ">Troubleshooting
    Application Errors</a> appendix.
   </p><p>
    You can change any of the values in the connection profiles just by
    overwriting the existing values with new ones. Similarly, if you
    select another connection profile, you can change any of its values.
    When you click the <span class="guibutton">OK</span> button after changing a
    profile's values, the changes are stored permanently if a successful
    connection to the MySQL server is established. You can also click
    the <span class="guibutton">...</span> button next to the
    <span class="guilabel">Connection</span> drop-down box. This brings up an
    <tt class="literal">Options</tt> dialog window that has a
    <tt class="literal">Connections</tt> section for modifying connection
    profiles. You can find the values you can set in the Connection
    dialog window in the description of the
    <tt class="literal">Connections</tt> section of the
    <a href="#mysql-gui-options" title="Chapter7.
 Options Dialog
">Options dialog</a>.
   </p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="mysql-query-browser-tour"></a>Chapter4.
   A Tour of the MySQL Query Browser
  </h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#mysql-query-browser-tour-mainwindow">4.1. 
    The Main Query Window
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-tour-querybar">4.2. 
    The Query Toolbar
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#mysql-query-browser-tour-querybar-navigation">4.2.1. 
     The Navigation Buttons
    </a></span></dt><dt><span class="sect2"><a href="#mysql-query-browser-tour-querybar-queryarea">4.2.2. 
     The Query Area
    </a></span></dt><dt><span class="sect2"><a href="#mysql-query-browser-tour-querybar-actionbuttons">4.2.3. 
     The Action Buttons
    </a></span></dt></dl></dd><dt><span class="sect1"><a href="#mysql-query-browser-tour-buttonbar">4.3. 
    The Advanced Toolbar
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-tour-resultarea">4.4. 
    The Result Area
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-tour-objectbrowser">4.5. 
    The Object Browser
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#mysql-query-browser-tour-objectbrowser-schemata">4.5.1. 
     The Database Browser
    </a></span></dt><dt><span class="sect2"><a href="#mysql-query-browser-tour-objectbrowser-bookmarks">4.5.2. 
     The Bookmark Browser
    </a></span></dt><dt><span class="sect2"><a href="#mysql-query-browser-tour-objectbrowser-history">4.5.3. 
     The History Browser
    </a></span></dt></dl></dd><dt><span class="sect1"><a href="#mysql-query-browser-tour-pandf">4.6. 
    The Parameter and Syntax Browser
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#mysql-query-browser-tour-pandf-parameterbrowser">4.6.1. 
     The Parameter Browser
    </a></span></dt><dt><span class="sect2"><a href="#mysql-query-browser-tour-pandf-syntaxbrowser">4.6.2. 
     The Syntax Browser
    </a></span></dt><dt><span class="sect2"><a href="#mysql-query-browser-tour-pandf-functionbrowser">4.6.3. 
     The Function browser
    </a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-tour-mainwindow"></a>4.1.
    The Main Query Window
   </h2></div></div><div></div></div><p>
    Once you successfully connect to a MySQL server you are presented
    with the main query window of the MySQL Query Browser. All of the
    application's functionality is available through this window.
   </p><div class="figure"><a name="id4674640"></a><p class="title"><b>Figure4.1.
     The MySQL Query Browser main query window
    </b></p><div><img src="images/mainscreen.png" alt="The MySQL Query Browser main query window"></div></div><p>
    <i><span class="remark">
     [MH] OUTDATED FIGURE AS OF QB 1.0.8.5
    </span></i>

    The main query window is divided up into several sections:

    </p><div class="itemizedlist"><ul type="disc"><li><p>
      <span class="emphasis"><em>Query Toolbar:</em></span> The query toolbar is where you
      create and execute your queries. It is composed of three
      navigation buttons (<span class="guibutton">Go Back</span>,
      <span class="guibutton">Next</span>, <span class="guibutton">Refresh</span>), the
      query area, two action buttons (<span class="guibutton">Execute</span> and
      <span class="guibutton">Stop</span>), and a status indicator.
     </p></li><li><p>
      <span class="emphasis"><em>Advanced Toolbar:</em></span> The advanced toolbar
      contains three sets of buttons: the Transaction Buttons
      (<span class="guibutton">Start</span>, <span class="guibutton">Commit</span>,
      <span class="guibutton">Rollback</span>), the query management buttons
      (<span class="guibutton">Explain</span>, <span class="guibutton">Compare</span>),
      and the query building buttons (<span class="guibutton">Select</span>,
      <span class="guibutton">From</span>, <span class="guibutton">Where</span>, and so
      on.)
     </p></li><li><p>
      <span class="emphasis"><em>Result Area:</em></span> All query results are displayed
      in the result area. You can have multiple tabs active at one time,
      allowing you to work on multiple queries. The result area can be
      split vertically and horizontally for performing comparisons, and
      queries in different parts of a split result area can be joined
      together for master-detail analysis.
     </p></li><li><p>
      <span class="emphasis"><em>Object Browser:</em></span> The object browser is part of
      the sidebar and allows you to manage your databases, bookmarks,
      and history. You can choose which database and tables to query,
      add commonly-used queries to a collection of bookmarks, and browse
      through previously issued queries to use them again.
     </p></li><li><p>
      <span class="emphasis"><em>Parameter and Syntax Browser:</em></span> The parameter
      and Syntax Browser is part of the sidebar and is used to look up
      built-in functions, and to manage queries that contain parameters.
      One example of this is when establishing a master-detail pair of
      queries. The data in the master query is available as parameters
      to the detail query.
     </p></li></ul></div><p>
   </p><p>
    Most of these sections can be displayed and hidden using the
    <span class="guimenu">View</span> menu by checking and unchecking the elements
    you wish to view.
   </p><p>
    Each of these topics are covered in more detail in the sections that
    follow.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-tour-querybar"></a>4.2.
    The Query Toolbar
   </h2></div></div><div></div></div><p>
    All queries, whether generated automatically, graphically, or
    manually, appear in the <tt class="literal">Query Toolbar</tt>. The
    simplest way to use the MySQL Query Browser is to type a query into the
    query area and click the execute button. A statement terminator such
    as <tt class="literal">;</tt> or <tt class="literal">\G</tt> is not required.
   </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-query-browser-tour-querybar-navigation"></a>4.2.1.
     The Navigation Buttons
    </h3></div></div><div></div></div><p>
     To the left of the query area are the navigation buttons. The
     navigation buttons allow you to browse through your query history
     so that you can review and re-execute a previously executed query.
     The query history is available through the
     <a href="#mysql-query-browser-tour-objectbrowser" title="4.5.
    The Object Browser
   ">object
     browser</a>.
    </p><p>
     Clicking the <span class="guibutton">Go Back</span> button loads the
     previous query in your history, wheras the <span class="guibutton">Go
     Next</span> button loads the following query. Only queries
     that execute without errors are added to your history.
    </p><p>
     As you navigate with the <span class="guibutton">Next</span> and
     <span class="guibutton">Go Back</span> buttons, the queries you navigate
     through are not executed unless you explicitly execute them by
     clicking the <span class="guibutton">Execute</span> button. The
     <span class="guibutton">Refresh</span> button re-executes the last executed
     query, which may or may not be the current query in the query area.
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-query-browser-tour-querybar-queryarea"></a>4.2.2.
     The Query Area
    </h3></div></div><div></div></div><p>
     The query area is where the text of all queries and statements are
     displayed. The query area is three lines high by default and
     automatically expands to a maximum of ten lines in height. For
     queries longer than ten lines, the query area is scrollable.
    </p><div class="figure"><a name="id4738161"></a><p class="title"><b>Figure4.2.
      The query area expanded to ten lines
     </b></p><div><img src="images/querybar.png" alt="The query area expanded to ten lines"></div></div><p>
     The following commands are available by right-clicking the query
     area: <span class="guimenu">Cut</span>
     (<span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">X</b></span>), <span class="guimenu">Copy</span>
     (<span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">C</b></span>),
     <span class="guimenu">Paste</span>
     (<span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">V</b></span>),
     <span class="guimenu">Clear</span>
     (<span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">N</b></span>), <span class="guimenu">Open Query
     ...</span> (<span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">O</b></span>), and
     <span class="guimenu">Save Query As ...</span>
     (<span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">S</b></span>). The Open and Save
     commands load the contents of an SQL file into the query area or
     save the contents of the query area into a text file.
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-query-browser-tour-querybar-actionbuttons"></a>4.2.3.
     The Action Buttons
    </h3></div></div><div></div></div><p>
     To the right of the query area are the action buttons. The
     <span class="guibutton">Execute</span> button executes any queries in the
     query area, wheras the <span class="guibutton">Stop</span> button ceases
     execution.
    </p><p>
     If you click the down-arrow below the
     <span class="guibutton">Execute</span> button, there are three potential
     execution options:
    </p><div class="itemizedlist"><ul type="disc"><li><p>
      <span class="guimenu">Execute</span>
      (<span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">Enter</b></span>): This executes the
      query and displays the results in the currently active result
      area.
     </p></li><li><p>
      <span class="guimenu">Execute in new Tab</span>
      (<span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">Shift</b></span>+<span><b class="keycap">Enter
      </b></span>): This executes the query and displays the results in a
      newly created result area.
     </p></li><li><p>
      <span class="guimenu">Split Tab and Execute</span>
      (<span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">Alt</b></span>+<span><b class="keycap">Enter
      </b></span>): This splits the result area horizontally and then
      displays the query results in the lower half of the result area.
     </p></li></ul></div><p>
     To the right of the action buttons is the status indicator. The
     status indicator shows the standard MySQL logo when the MySQL Query
     Browser is idle, and displays an animated logo when the
     MySQL Query Browser is busy processing a query. Both icons can be seen
     in the following illustration:
    </p><div class="figure"><a name="id4738422"></a><p class="title"><b>Figure4.3.
      The MySQL Query Browser status icons
     </b></p><div><img src="images/twosakilas.png" alt="The MySQL Query Browser status icons"></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-tour-buttonbar"></a>4.3.
    The Advanced Toolbar
   </h2></div></div><div></div></div><p>
    Below the query bar is the <tt class="literal">Advanced Toolbar</tt>. The
    <tt class="literal">Advanced Toolbar</tt> contains a set of buttons for
    transaction control, query management, and query building.
   </p><div class="figure"><a name="id4738483"></a><p class="title"><b>Figure4.4.
     The advanced toolbar
    </b></p><div><img src="images/buttonbar.png" alt="The advanced toolbar"></div></div><p>
    The left panel of the advanced toolbar contains the transaction
    control buttons. From left to right, the buttons allow you to start,
    commit, and roll back a transaction. As when using the command-line
    client, you can only use transactions with table handlers that
    support them (InnoDB for example). More information on transactions
    can be found in the
    <a href="http://dev.mysql.com/doc/mysql/en/InnoDB_transaction_model.html" target="_top">the
    MySQL Reference Manual</a>.
   </p><p>
    The center panel provides buttons for query management. The
    <span class="guibutton">Explain</span> button can be used to get the
    <tt class="literal">EXPLAIN</tt> output for the current query from the
    MySQL server, wheras the <span class="guibutton">Compare</span> button
    allows you to compare the results of two queries.
   </p><p>
    The right panel contains the query building buttons. You can use
    these buttons to build a query visually by clicking on the tables
    and columns that you wish to involve in your query, using
    specialized mouse pointers to indicate which part of the query the
    different fields and tables occupy.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-tour-resultarea"></a>4.4.
    The Result Area
   </h2></div></div><div></div></div><p>
    All query results are displayed in the result area. Within the
    result area you can use multiple tabs, and individual result areas
    can be split either vertically or horizontally. New tabs can be
    created either by choosing the <span class="guimenu">Execute in new Tab</span>
    option on the query bar, or by clicking the <span class="guibutton">New
    Tab</span> button at the top of the result area. In addition,
    you can also right-click on the current result area and choose the
    <span class="guimenu">Add new Tabsheet (Ctrl+T)</span> option.
   </p><p>
    Individual tabs can closed by either right-clicking within the
    result area and choosing the <span class="guimenu">Remove Tab</span> option,
    or by clicking the red <tt class="literal">X</tt> icon on the tab you wish
    to close.
   </p><p>
    To split a result area, right-click on it and choose either the
    <span class="guimenu">Split Tab vertically</span> or the <span class="guimenu">Split Tab
    horizontally</span> option. After splitting the result area you
    can then choose one half of the result area and view result sets
    within it. You can remove sections of the result area by
    right-clicking on the section you wish to remove and clicking
    <span class="guimenu">Remove Resultset</span>.
   </p><p>
    The result area can be used to review and edit the results of a
    query, with editing permitted as long as the query is based on a
    single table and there is sufficient key information to uniquely
    identify rows.

    <i><span class="remark">
     [MH] RESULT SETS BASED ON JOINS WILL EVENTUALLY BE EDITABLE, UPDATE
     THIS WHEN IT IS CHANGED!
    </span></i>

    To edit the contents of the result area you must enable edit mode
    through the use of the <span class="guibutton">Edit</span> button at the
    bottom of the result area. Any edits you make are not immediately
    applied, but instead you need to click the <span class="guibutton">Apply
    Changes</span> button next to the <span class="guibutton">Edit</span>
    button. Clicking the <span class="guibutton">Discard Changes</span> button
    throws away any changes you have made to the data.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-tour-objectbrowser"></a>4.5.
    The Object Browser
   </h2></div></div><div></div></div><p>
    The object browser allows you to browse your server's databases,
    your bookmarks, and your query history.
   </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-query-browser-tour-objectbrowser-schemata"></a>4.5.1.
     The Database Browser
    </h3></div></div><div></div></div><p>
     The database (schemata) browser is the primary screen of the object
     browser. You can use the database browser not only to select tables
     and fields to query, you can also edit tables, create new tables
     and databases, and drop tables and databases. The database browser
     is also one of the places where you can set the default database,
     which is a required action before you can start issuing queries.
    </p><div class="figure"><a name="id4738726"></a><p class="title"><b>Figure4.5.
      The database browser
     </b></p><div><img src="images/schematabrowser.png" alt="The database browser"></div></div><p>
     You can filter the databases shown by using the search bar at the
     top of the database browser. As you fill in the search bar,
     databases that do not match your search are hidden from view. You
     can clear the search bar by clicking the <span class="guibutton">X</span>
     button on the right side of the search bar. All databases will once
     again be displayed.
    </p><p>
     To view a database's tables click the black arrow on the left of
     the database name. You can view a table's columns by clicking on
     the black arrow to the left of the table name. You can also
     double-click on a database or table name to expand the database or
     table contents. Fields that form part of an index have a small key
     icon to the left of their name, otherwise they have a blue diamond
     icon.
    </p><p>
     To create a new database, right-click within the database browser
     and choose the <span class="guimenu">Create new Schema</span> option. You can
     create a new table by right-clicking the database you wish to add a
     table to and choosing the <span class="guimenu">Create new Table</span>
     option. You can drop tables and databases by right-clicking on the
     table or database you wish to drop and choosing either the
     <span class="guimenu">Drop Schema</span> or <span class="guimenu">Drop Table</span>
     option.
    </p><p>
     You can edit a table by right-clicking on it and choosing the
     <span class="guimenu">Edit Table</span> option. The MySQL Table Editor is
     identical to the one used in the MySQL Administrator application.
     For more information on editing tables, see
     <a href="#gui-table-editor" title="Chapter6.
   The MySQL Table Editor
  ">The MySQL Table Editor</a>.
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-query-browser-tour-objectbrowser-bookmarks"></a>4.5.2.
     The Bookmark Browser
    </h3></div></div><div></div></div><p>
     You can place your more commonly used queries in bookmarks so that
     you can quickly retrieve them and re-use them later. To add a query
     to your bookmarks highlight and drag it from the query area into
     the bookmark browser.
    </p><p>
     Your bookmarks can be organized into folders and subfolders to help
     with management of your queries. To add a new subfolder right-click
     on an existing folder and choose the <span class="guimenu">Create Bookmark
     Folder</span> option. You can remove bookmarks and folders by
     right-clicking on them and choosing the <span class="guimenu">Delete
     Items</span> option. After you confirm that you wish to delete
     the item it will be removed from your bookmark list. <span class="emphasis"><em>If
     you delete a folder all items and subfolders within the folder are
     also deleted.</em></span>
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-query-browser-tour-objectbrowser-history"></a>4.5.3.
     The History Browser
    </h3></div></div><div></div></div><p>
     With the history browser you can browse through all the queries you
     have previously issued. To expand a given day's queries,
     double-click on the day. To load a history item into the query
     area, double-click on it or drag it to the query area.
    </p><p>
     You can remove history items by right-clicking on them and choosing
     the <span class="guimenu">Delete Selected History Entries</span> option from
     the drop-down menu. You can also use the <span class="guimenu">Clear
     History</span> option to erase all history entries.
    </p><p>
     You can create bookmarks from history items by right-clicking on a
     selected history item and choosing the <span class="guimenu">Add History Item as
     Bookmark</span> menu option.
    </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-tour-pandf"></a>4.6.
    The Parameter and Syntax Browser
   </h2></div></div><div></div></div><p>
    Within the parameter and syntax browser are shortcuts to query
    elements that are not part of the tables themselves. The parameter
    browser provides different local, global, and dynamic parameters
    that can help build your queries, wheras the syntax browser provides
    a convenient reference to the built-in functions of the MySQL
    server.
   </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-query-browser-tour-pandf-parameterbrowser"></a>4.6.1.
     The Parameter Browser
    </h3></div></div><div></div></div><p>
     The parameter browser contains all the local, global, and dynamic
     parameters that can be included in your query. At the moment only
     the dynamic parameters are available, which allow you to create
     master-detail queries.

     <i><span class="remark">
      [MH] UPDATE AS NECESSCARY
     </span></i>
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-query-browser-tour-pandf-syntaxbrowser"></a>4.6.2.
     The Syntax Browser
    </h3></div></div><div></div></div><p>
     The syntax browser provides a quick reference tool for determining
     proper syntax to use when constructing queries. By double-clicking
     on the various types of syntax (SELECT, REPLACE, and so forth) you
     can bring up reference information using the in-line help system.
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-query-browser-tour-pandf-functionbrowser"></a>4.6.3.
     The Function browser
    </h3></div></div><div></div></div><p>
     The function browser provides a quick reference tool for usage of
     the built-in functions of the MySQL server. By double-clicking on
     the various functions you can bring up reference information using
     the in-line help system.
    </p></div></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="mysql-query-browser-using"></a>Chapter5.
   Using The MySQL Query Browser
  </h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#mysql-query-browser-using-manualentry">5.1. 
    Entering and Editing Queries Manually
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-graphicalbuilding">5.2. 
    Building Queries Visually
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-navigatingtabsheet">5.3. 
    Navigating Result Sets Within the Result Area
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-export">5.4. 
    Exporting Result Sets
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-blobs">5.5. 
    Handling BLOB and TEXT Columns
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-editingtabsheet">5.6. 
    Editing Result Sets Within the Result Area
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-compare">5.7. 
    Comparing Result Sets
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-masterdetail">5.8. 
    Creating Master-Detail Views
   </a></span></dt><dt><span class="sect1"><a href="#mysql-query-browser-using-codeedit">5.9. 
    Editing Queries From a Development Tool
   </a></span></dt></dl></div><p>
   In this chapter we further describe the tools available in the
   MySQL Query Browser through practical examples of their use.
  </p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-using-manualentry"></a>5.1.
    Entering and Editing Queries Manually
   </h2></div></div><div></div></div><p>
    The most common task performed with the query browser is that of
    executing queries and analyzing their results. The most direct way
    to create a query is to type it directly into the query area. As you
    type in your query, the SQL syntax portions of the query(SELECT,
    FROM, WHERE, and so on.) are highlighted in blue and changed to
    uppercase.
   </p><p>
    Once you have entered your query, click on the
    <span class="guibutton">Execute</span> button and your query results are
    displayed in the result area. You can also press
    <span><b class="keycap">Ctrl</b></span>+ <span><b class="keycap">Enter</b></span> to execute the query.
    If there is an error with your query an error area appears at the
    bottom of the result area and displays the relevant error message
    and error number.
   </p><p>
    In addition to loading the query results into the current active
    result area, you can also create a new result area for the results
    of your query or split your current result area and load results
    into the new section.
   </p><p>
    To execute the query and load the results into a new result area
    click the down-arrow below the <span class="guibutton">Execute</span> button
    and choose the <span class="guimenu">Execute in new Tab</span> option or press
    <span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">Shift</b></span>+<span><b class="keycap">Enter
    </b></span>.
   </p><p>
    To split the active result area and display the query results click
    the down-arrow below the <span class="guibutton">Execute</span> button and
    choose the <span class="guimenu">Split Tab and Execute</span> option or press
    <span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">Alt</b></span>+<span><b class="keycap">Enter</b></span> .
   </p><p>
    You must set a default database before you can query the database
    successfully. You can set the default database at the connection
    screen, by right-clicking on a database in the database browser and
    choosing <span class="guimenu">Make Default Schema</span>, or by choosing the
    <span class="guimenu">Change Default Schema</span> option from the
    <span class="guimenu">File</span> menu.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-using-graphicalbuilding"></a>5.2.
    Building Queries Visually
   </h2></div></div><div></div></div><p>
    One feature of the MySQL Query Browser is the ability to build queries
    visually. This allows you to select the columns and tables you wish
    to query from the database browser and have the query created
    automatically based on your choices.
   </p><p>
    The first step to creating a query visually is to choose a table to
    query. Click and drag the table you wish to query to the query area
    to start a query. For example, by dragging the City table to the
    query area, <tt class="literal">SELECT * FROM City C</tt> is added to the
    query area. You can also double-click a table to start a new
    <tt class="literal">SELECT</tt> query.
   </p><p>
    You can drag additional tables to the query area while holding the
    <span><b class="keycap">Ctrl</b></span> or <span><b class="keycap">Shift</b></span> keys to add them to
    the <tt class="literal">FROM</tt> clause. By holding the
    <span><b class="keycap">Shift</b></span> key while dragging, the tables are joined. By
    holding the <span><b class="keycap">Ctrl</b></span> key while dragging, a
    <tt class="literal">LEFT OUTER JOIN</tt> is performed. The tables are
    joined based on identical column names for MyISAM tables and foreign
    key information for InnoDB tables.
   </p><div class="figure"><a name="id4739294"></a><p class="title"><b>Figure5.1.
     The table tool
    </b></p><div><img src="images/tabletool.png" alt="The table tool"></div></div><p>
    When you select a table from the database browser and drag it over
    the query area, a table tool with some query composition actions is
    displayed. Drop the table you're dragging on the desired action and
    the query is modified accordingly. The following actions are
    possible:
   </p><div class="itemizedlist"><ul type="disc"><li><p>
     <tt class="literal">SELECT</tt> replaces the current statement with a
     <tt class="literal">SELECT</tt> query containing the dragged table.
    </p></li><li><p>
     <tt class="literal">Add Table</tt> adds the dragged table to the list of
     tables in the current <tt class="literal">SELECT</tt> query
    </p></li><li><p>
     <tt class="literal">JOIN Table</tt>: If a <tt class="literal">SELECT</tt> query
     is already in the query box, with a table in it, the new dragged
     table is added and the appropriate <tt class="literal">WHERE</tt> clauses
     to perform a <tt class="literal">JOIN</tt> will be added
    </p></li><li><p>
     <tt class="literal">LEFT OUTER JOIN</tt> is the same as the previous, but
     does a <tt class="literal">LEFT OUTER JOIN</tt> instead of a
     <tt class="literal">JOIN</tt>
    </p></li><li><p>
     <tt class="literal">UPDATE</tt> replaces the current statement with an
     <tt class="literal">UPDATE</tt> statement containing the dragged table
    </p></li><li><p>
     <tt class="literal">INSERT</tt> replaces the current statement with an
     <tt class="literal">INSERT</tt> statement containing the dragged table
    </p></li><li><p>
     <tt class="literal">DELETE</tt> replaces the current statement with a
     <tt class="literal">DELETE</tt> statement containing the dragged table
    </p></li></ul></div><p>
    Once a table is selected, you can choose specific columns to query;
    click the <span class="guibutton">Select</span> button from the query
    building buttons on the button bar. Your mouse pointer is changed to
    a <tt class="literal">Select</tt> pointer, which you can use to choose
    columns from the database browser. For example, by clicking on the
    Id, Name, and Country fields of the <tt class="literal">world</tt> sample
    database, the query <tt class="literal">SELECT C.Id, C.Name, C.Country FROM
    City C</tt> is built in the query area.
   </p><p>
    Once you have chosen the columns you wish to query, you can use the
    other query building buttons to complete your query with
    <tt class="literal">WHERE</tt>, <tt class="literal">GROUP BY</tt>, and
    <tt class="literal">ORDER BY</tt> clauses. When a new section of the query
    is added with the query building buttons, the cursor in the query
    area is placed in position for editing; if you click a field with
    the WHERE pointer, the cursor is in position for you to type in the
    details of the <tt class="literal">WHERE</tt> clause.
   </p><p>
    You can change between the different query building pointers by
    clicking on the query building buttons in the button bar, or by
    using a combination of <span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">Alt</b></span>
    and the first letter of the pointer you wish to use
    (<span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">Alt</b></span>+<span><b class="keycap">S</b></span> for
    <tt class="literal">SELECT</tt>,
    <span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">Alt</b></span>+<span><b class="keycap">W</b></span> for
    <tt class="literal">WHERE</tt>, and so forth.)
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-using-navigatingtabsheet"></a>5.3.
    Navigating Result Sets Within the Result Area
   </h2></div></div><div></div></div><p>
    Once you have successfully executed a query you are then able to
    view and manipulate the result set within the result area.
   </p><p>
    You can navigate the result area using the arrow keys, tab key, and
    PageUp/PageDown keys. The Home and End keys can be used to move to
    the first and last column within a given row. The
    <span class="guibutton">First</span> and <span class="guibutton">Last</span> buttons
    at the bottom of the result area can be used to move to the first
    and last rows of the result set. The <span class="guibutton">Search</span>
    button at the bottom of the result area can be used to find a
    specific value within the result set.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-using-export"></a>5.4.
    Exporting Result Sets
   </h2></div></div><div></div></div><p>
    You can export any result set from MySQL Query Browser by right-clicking
    within the result set and choosing an option from the
    <span class="guimenu">Export Resultset</span> sub-menu. You can choose to
    export the result set in <tt class="literal">CSV</tt>,
    <tt class="literal">XML</tt>, <tt class="literal">HTML</tt>, or Microsoft Excel
    <tt class="literal">XLS</tt> formats.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-using-blobs"></a>5.5.
    Handling BLOB and TEXT Columns
   </h2></div></div><div></div></div><p>
    The MySQL Query Browser provides functionality for dealing with
    <tt class="literal">BLOB</tt> and <tt class="literal">TEXT</tt> columns through
    a series of special icons.
   </p><div class="figure"><a name="id4739730"></a><p class="title"><b>Figure5.2.
     The BLOB handling icons
    </b></p><div><img src="images/blob-buttons.png" alt="The BLOB handling icons"></div></div><p>
    These icons appear in any <tt class="literal">BLOB</tt> or
    <tt class="literal">TEXT</tt> columns in your result set. From left to
    right the following icons are available:
   </p><div class="itemizedlist"><ul type="disc"><li><p>
     <tt class="literal">Open File</tt>: This icon looks like a file folder
     and is used to open a file for loading into the field.
    </p></li><li><p>
     <tt class="literal">View</tt>: This icon looks like an eye and is used to
     open the field viewer to view the contents of the field. The field
     viewer can be used to view <tt class="literal">TEXT</tt> fields and
     <tt class="literal">BLOB</tt> fields that contain images.
    </p></li><li><p>
     <tt class="literal">Edit</tt>: This field looks like a wrench and opens
     the field viewer in edit mode, allowing you to make changes to the
     data and apply the changes to the result set.
    </p></li><li><p>
     <tt class="literal">Save</tt>: This icon looks like a floppy disk and is
     used to save the contents of a <tt class="literal">TEXT</tt> or
     <tt class="literal">BLOB</tt> field into a file.
    </p></li><li><p>
     <tt class="literal">Clear</tt>: This icon looks like a red X within a red
     box and is used to clear the contents of a <tt class="literal">TEXT</tt>
     ot <tt class="literal">BLOB</tt> field.
    </p></li></ul></div><p>
    Only the <tt class="literal">View</tt> and <tt class="literal">Save</tt> icons
    are visible is you have not enabled editing for your record set. See

    <a href="#mysql-query-browser-using-editingtabsheet" title="5.6.
    Editing Result Sets Within the Result Area
   ">Section5.6, &#8220;
    Editing Result Sets Within the Result Area
   &#8221;</a>

    for information on editing result sets.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-using-editingtabsheet"></a>5.6.
    Editing Result Sets Within the Result Area
   </h2></div></div><div></div></div><p>
    When a query is based on a single table, with sufficient identifying
    information, the result set can be edited from within the result
    area.

    <i><span class="remark">
     [MH] THIS WILL CHANGE, UPDATE WHEN APPROPRIATE
    </span></i>

    To edit a result set click the <span class="guibutton">Edit</span> button.
    If the <span class="guibutton">Edit</span> button is not active, your result
    set is not editable.
   </p><p>
    Once in edit mode you can insert, update, and delete rows from the
    result set visually. You can navigate the fields with the
    <span><b class="keycap">Tab</b></span> and arrow keys, and pressing
    <span><b class="keycap">Enter</b></span> allows you to edit the content of a field.
    You can also double-click a field to make it editable. When editing
    a field, the tab key will move you to the next field in an editable
    state. All edited fields are highlighted in blue for easy
    identification.
   </p><p>
    To add rows to the result set, scroll to the bottom of the result
    area and fill in the fields of the blank row found there. All new
    rows are highlighted in green.
   </p><p>
    To delete a row right-click on the row and choose the
    <span class="guimenu">Delete Row</span> option. All deleted rows are
    highlighted in red.
   </p><p>
    Changes made to the result set are not applied immediately, but
    instead are cached until the <span class="guibutton">Apply Changes</span>
    button is pressed. You can abort your edits with the
    <span class="guibutton">Discard Changes</span> button. Exiting edit mode
    without choosing to apply or discard your changes results in you
    being prompted to apply or discard your work.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-using-compare"></a>5.7.
    Comparing Result Sets
   </h2></div></div><div></div></div><p>
    You can compare result sets graphically with the MySQL Query Browser,
    allowing you to easily determine where rows have been inserted,
    updated, or deleted.
   </p><p>
    To compare two result sets, execute the first of the queries you
    wish to compare. Once the result set has loaded, right-click on the
    result set and choose the <span class="guimenu">Split Tab Horizontally</span>
    option. Load your second query into the new section of the result
    area and click the <span class="guibutton">Compare</span> button to compare
    the two result sets.
   </p><p>
    When you have activated the compare mode, both result sets will
    scroll in unison, both vertically and horizontally. Rows are matched
    for comparison, with blank rows added when one set has a row that
    the other set lacks.
   </p><p>
    If one result set has a row that the other result set does not have,
    that row is highlighted in green. The other result set has a blank
    row inserted that is highlighted in red. If both result sets have a
    matching row, but individual fields are different, those fields are
    highlighted in blue.
   </p><p>
    In order to successfully compare two result sets, you need two
    queries with matching column names. The tables which the data is
    based on need to have primary keys defined in order for the
    MySQL Query Browser to match rows. Fields in your result sets must have
    the same names, and must be in the same order.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-using-masterdetail"></a>5.8.
    Creating Master-Detail Views
   </h2></div></div><div></div></div><p>
    MySQL Query Browser makes it easy to view data that is in a
    master-detail (one to many) relationship. This can be useful for
    viewing customer/order data, group/member data, and so forth.
   </p><p>
    To display a master-detail view, first query the master table in a
    new result area. For example, using the <tt class="literal">world</tt>
    sample database, you could issue a query like <tt class="literal">SELECT Code,
    Name, Continent FROM Country</tt>.
   </p><p>
    Once you have created the master result set, right-click on the
    result area and choose the <span class="guimenu">Split Tab Vertically</span>
    option. For the detail query, create a query that uses the dynamic
    parameters available from the master query, as seen in the parameter
    browser. In this example, we could query the City table like this:
    <tt class="literal">SELECT Id, Name FROM City WHERE Country = :Code</tt>.
   </p><p>
    The colon character indicates to the MySQL Query Browser that you are
    adding a dynamic parameter, and a pop-up list of available
    parameters should appear within the query area, allowing you to
    choose a parameter using the arrow keys. You can also type the name
    of the parameter that you would like to use to link the detail
    query.
   </p><div class="figure"><a name="id4740131"></a><p class="title"><b>Figure5.3.
     The dynamic parameter list
    </b></p><div><img src="images/dynamiclist.png" alt="The dynamic parameter list"></div></div><p>
    Once you execute the detail query it will automatically refresh any
    time you change the active row in the master query, allowing you to
    quickly see all detail rows as you navigate the master result set.
   </p><p>
    You can repeat this process, splitting the result area additional
    times, allowing you to have detail result sets for detail result
    sets.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-query-browser-using-codeedit"></a>5.9.
    Editing Queries From a Development Tool
   </h2></div></div><div></div></div><p>
    In order to help programmers optimize and troubleshoot their queries
    more efficiently, the MySQL Query Browser can copy queries from
    application code using your favorite IDE.
   </p><p>
    <span class="emphasis"><em>This functionality is only available for the Windows
    version of MySQL Query Browser.</em></span>
   </p><p>
    The following PHP code will be used as an example:

</p><pre class="programlisting">
    $SQL = "SELECT Id, Name, Country FROM City";
    mysql_query($SQL,$db);
   </pre><p>

    To copy the listing into the MySQL Query Browser, highlight the query
    from within your editor and press <span><b class="keycap">Ctrl</b></span> +
    <span><b class="keycap">Alt</b></span> + <span><b class="keycap">Shift</b></span> + <span><b class="keycap">C</b></span>.
    The non-query portions of the highlighted area will be stripped and
    the query will be pasted into the query area.
   </p><p>
    After editing the query, press <span><b class="keycap">Ctrl</b></span> +
    <span><b class="keycap">Alt</b></span> + <span><b class="keycap">Shift</b></span> + <span><b class="keycap">V</b></span>
    to load the modified query back into your original code. The
    surrounding PHP code will be re-inserted along with the modified
    query. This functionality allows you to edit queries quickly while
    programming.
   </p><p>
    In order to use this functionality your editing application needs to
    support the standard Windows clipboard system, which most Windows
    applications do.
   </p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="gui-table-editor"></a>Chapter6.
   The MySQL Table Editor
  </h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#gui-table-editor-introduction">6.1. 
    Introduction
   </a></span></dt><dt><span class="sect1"><a href="#gui-table-editor-main-window">6.2. 
    The Main Editor Window
   </a></span></dt><dt><span class="sect1"><a href="#gui-table-editor-columns-and-indices">6.3. 
    The Columns And Indices Tab
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#gui-table-editor-columns-and-indices-column-editor">6.3.1. 
     The Column Editor
    </a></span></dt><dt><span class="sect2"><a href="#gui-table-editor-columns-and-indices-detail">6.3.2. 
     The Detail Area
    </a></span></dt></dl></dd><dt><span class="sect1"><a href="#gui-table-editor-Table-Options">6.4. 
    The Table Options Tab
   </a></span></dt><dt><span class="sect1"><a href="#gui-table-editor-advanced-options">6.5. 
    The Advanced Options Tab
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#gui-table-editor-advanced-options-various">6.5.1. 
     The Various Section
    </a></span></dt><dt><span class="sect2"><a href="#gui-table-editor-advanced-options-row-options">6.5.2. 
     The Row Options Section
    </a></span></dt><dt><span class="sect2"><a href="#gui-table-editor-advanced-options-storage-options">6.5.3. 
     The Storage Options Section
    </a></span></dt><dt><span class="sect2"><a href="#gui-table-editor-advanced-options-merge-options">6.5.4. 
     The Merge Table Options Section
    </a></span></dt><dt><span class="sect2"><a href="#gui-table-editor-advanced-options-raid-options">6.5.5. 
     The Table RAID Settings Section
    </a></span></dt></dl></dd><dt><span class="sect1"><a href="#gui-table-editor-changes">6.6. 
    Applying Your Changes
   </a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="gui-table-editor-introduction"></a>6.1.
    Introduction
   </h2></div></div><div></div></div><p>
    The MySQL Table Editor is a component of both the MySQL Query Browser and
    MySQL Administrator, and allows for the visual creation and modification
    of tables.
   </p><p>
    The MySQL Table Editor can be accessed from the MySQL Query Browser by
    right-clicking on a table within the database browser and choosing
    the <span class="guimenu">Edit Table</span> option, or by right-clicking on a
    database within the database browser and choosing the
    <span class="guimenu">Create New Table</span> option.
   </p><p>
    The MySQL Table Editor can be accessed from MySQL Administrator through the
    <span class="guimenu">Catalogs</span> screen. Once you have selected a
    database, right-click on a table and choose the <span class="guimenu">Edit
    Table</span> option from the drop-down menu. You can also select
    a table and click the <span class="guibutton">Edit Table</span> button to
    access the MySQL Table Editor.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="gui-table-editor-main-window"></a>6.2.
    The Main Editor Window
   </h2></div></div><div></div></div><p>
    The MySQL Table Editor consists of a work space divided into three tabs,
    some general information prompts, and three action buttons.
   </p><p>
    Regardless of the tab you have active, you can always edit the table
    name, the database it belongs to, and the table comment.
   </p><div class="figure"><a name="id4740951"></a><p class="title"><b>Figure6.1.
     The MySQL Table Editor
    </b></p><div><img src="images/tableeditor.png" alt="The MySQL Table Editor"></div></div><p>
    The tabbed area is divided into three sections:
   </p><div class="itemizedlist"><ul type="disc"><li><p>
     <span class="emphasis"><em>Columns and Indices:</em></span> Use the Columns and
     Indices tab to create and modify the table's column and index
     information. You can also create FOREIGN KEY relationships using
     this tab.
    </p></li><li><p>
     <span class="emphasis"><em>Table Options:</em></span>Use the Table Options tab to
     choose the storage engine used by the table and the table's default
     character set.
    </p></li><li><p>
     <span class="emphasis"><em>Advanced Options:</em></span> Use the Advanced Options tab
     to configure advanced options such as per-table storage directory,
     MERGE and RAID table options, and table/row length options.
    </p></li></ul></div><p>
    Each of these areas are discussed in further detail in the
    following sections.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="gui-table-editor-columns-and-indices"></a>6.3.
    The Columns And Indices Tab
   </h2></div></div><div></div></div><p>
    The <tt class="literal">Columns and Indices</tt> tab can be used to
    display and edit all column and index information for your table.
    Using this tab, you can add, drop, and alter columns and indexes.
   </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gui-table-editor-columns-and-indices-column-editor"></a>6.3.1.
     The Column Editor
    </h3></div></div><div></div></div><p>
     You can use the column editor to change the name, data type, default
     value, and other properties of your table's columns.
    </p><div class="figure"><a name="id4741062"></a><p class="title"><b>Figure6.2.
      The column editor
     </b></p><div><img src="images/columneditor.png" alt="The column editor"></div></div><p>
     To change the name, data type, default value, or comment of a
     column, double-click on the value you wish to change. The value becomes editable and you can the complete your changes by
     pressing the <span><b class="keycap">Enter</b></span> key.
    </p><p>
     To modify the flags on a column (<tt class="literal">UNSIGNED</tt>,
     <tt class="literal">BINARY</tt>, <tt class="literal">ASCII</tt>, and so on) check
     and uncheck the boxes corresponding to the flag you wish to change.
    </p><p>
     To the left of the column name is an icon that indicates whether
     the column is a member of the primary key. If the icon is a small
     key, that column belongs to the primary key, otherwise the icon is a blue
     diamond. To add or remove a column from the
     primary key, you can click on the icon.
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gui-table-editor-columns-and-indices-detail"></a>6.3.2.
     The Detail Area
    </h3></div></div><div></div></div><p>
     The detail area of the <tt class="literal">Columns and Indices</tt> tab
     is divided into three tabs and is used for modifying the index,
     foreign key, and miscellaneous information regarding your columns.
    </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="gui-table-editor-columns-and-indices-detail-indices"></a>6.3.2.1.
      The Indices Tab
     </h4></div></div><div></div></div><p>
      The <tt class="literal">Indices</tt> tab holds all index information for
      your table. You can add, drop, and modify indexes using the
      indices tab, in combination with the column editor.
     </p><div class="figure"><a name="id4741176"></a><p class="title"><b>Figure6.3.
       The index editor
      </b></p><div><img src="images/indexeditor.png" alt="The index editor"></div></div><p>
      To add an index, click the <span class="guibutton">+</span> (plus) button
      below the index list. You will be prompted for an index name and
      then the new index is created. To drop an index, select the index
      and click the <span class="guibutton">-</span> (minus) button to drop the
      index from the index list.
     </p><p>
      Use the <span class="guilabel">Index Name</span> and <span class="guilabel">Index
      Kind</span> dialogs to modify the name and type
      (<tt class="literal">UNIQUE</tt>, <tt class="literal">FULLTEXT</tt>, and so on) of
      the index.
     </p><p>
      To add columns to an index, either click and drag the column to
      the <span class="guilabel">Index Columns</span> box or select the column
      you wish to add and click the <span class="guibutton">+</span> (plus)
      button to the right of the <span class="guilabel">Index Columns</span> box.
      You can remove a column from the index by selecting the column and
      clicking the <span class="guibutton">-</span> (minus) button to drop the
      column from the index.
     </p><p>
      To change an index to only refer to a column prefix (such as with
      the CHAR and VARCHAR string data types), select the index column
      you wish to prefix in the <span class="guilabel">Index Columns</span> box
      and then click the arrow icon to the right of the <span class="guilabel">Index
      Columns</span> box. Select the <span class="guimenu">Set Index Column
      Length</span> option from the drop-down menu that appears. You
      can set the desired prefix length in the dialog that appears.
     </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="gui-table-editor-columns-and-indices-detail-foreign-keys"></a>6.3.2.2.
      The Foreign Keys Tab
     </h4></div></div><div></div></div><p>
      The <tt class="literal">Foreign Keys</tt> tab is divided into two
      sections, one with a list of foreign keys and one with various
      dialogs for foreign key settings.
     </p><p>
      To add a foreign key, click the <span class="guibutton">+</span> (plus)
      button below the foreign key list. You will be prompted to name
      the new foreign key, and it is then be added to the list.
     </p><p>
      To drop a foreign key, select the foreign key and click the
      <span class="guibutton">-</span> (minus) button below the foreign key
      list. The foreign key is then dropped from the foreign key list.
     </p><p>
      You can modify the name of the foreign key, its <tt class="literal">ON
      DELETE</tt>, and its <tt class="literal">ON UPDATE</tt> actions using
      the dialogs provided in the <span class="guilabel">Foreign Key
      Settings</span> section of the tab.
     </p><p>
      To establish a foreign key relationship, choose a table from the
      <span class="guilabel">Ref. Table</span> drop-down list. The columns that
      can be referenced as foreign keys are listed in the area
      below, and you can drag a column from the column editor to the
      <span class="guilabel">Column</span> section to the left of the column you
      wish to reference.
     </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="gui-table-editor-columns-and-indices-detail-column-details"></a>6.3.2.3.
      The Column Details Tab
     </h4></div></div><div></div></div><p>
      The <tt class="literal">Column Details</tt> tab provides an interface
      for setting the parameters of a column without using the table
      interface of the column editor.
     </p><p>
      All settings that are available in the
      <a href="#gui-table-editor-columns-and-indices-column-editor" title="6.3.1.
     The Column Editor
    ">Column
      Editor</a> are also available in the Column Details tab, and in
      addition you can also configure the column character set and
      column default collation from the Column Details tab.
     </p></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="gui-table-editor-Table-Options"></a>6.4.
    The Table Options Tab
   </h2></div></div><div></div></div><p>
    The <tt class="literal">Table Options</tt> tab allows you to change the
    storage engine and character set of your table. The potential
    storage engines are listed, along with a brief summary of each
    storage engine's features and strengths.
   </p><p>
    To change the storage engine for your table, click on the radio
    button next to the desired storage engine.
   </p><p>
    To change the default character set or collation of your table,
    choose a new option from the drop-down list of available character
    sets.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="gui-table-editor-advanced-options"></a>6.5.
    The Advanced Options Tab
   </h2></div></div><div></div></div><p>
    The <tt class="literal">Advanced Options</tt> tab is used to configure
    table options that would be considered outside the standard set of
    options that most users designate when creating and modifying
    tables.
   </p><p>
    The <tt class="literal">Advanced Options</tt> tab is divided into several
    sub-sections, each of which is described in the upcoming
    sections of this manual.
   </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gui-table-editor-advanced-options-various"></a>6.5.1.
     The Various Section
    </h3></div></div><div></div></div><p>
     The <tt class="literal">Various</tt> section of the <tt class="literal">Advanced
     Options</tt> tab contains options for you to set the
     <tt class="literal">PACK KEYS</tt> behavior, the table password, the
     initial <tt class="literal">AUTO_INCREMENT</tt> value, and the delayed
     key update behavior.
    </p><p>
     The <tt class="literal">AUTO_INCREMENT</tt> and delayed key update
     behaviors apply only to MyISAM tables.
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gui-table-editor-advanced-options-row-options"></a>6.5.2.
     The Row Options Section
    </h3></div></div><div></div></div><p>
     The <tt class="literal">Row Options</tt> section can be used to configure
     options such as the row format, checksum use, and the row size
     parameters needed for large tables.
    </p><p>
     To set the row format, choose the desired row format from the
     drop-down list. See
     <a href="http://dev.mysql.com/doc/mysql/en/MyISAM_table_formats.html" target="_top">http://dev.mysql.com/doc/mysql/en/MyISAM_table_formats.html</a>
     for more information on the different row formats that are
     available. This option only applies to MyISAM tables.
    </p><p>
     When you expect a table to be particularly large, use the
     <span class="guilabel">Avg Row Length</span>, <span class="guilabel">Min Rows</span>,
     and <span class="guilabel">Max Rows</span> options to enable the MySQL
     server to better accommodate your data. See
     <a href="http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html" target="_top">http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html</a>
     for more information on how to use these options.
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gui-table-editor-advanced-options-storage-options"></a>6.5.3.
     The Storage Options Section
    </h3></div></div><div></div></div><p>
     The <tt class="literal">Storage Options</tt> section is used to configure
     a custom path to the table storage and data files. This option can
     help improve data integrity and server performance by locating
     different tables on different hard-drives.
    </p><p>
     This option is only available for MyISAM tables and is not
     available for servers running under the Windows operating system.
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gui-table-editor-advanced-options-merge-options"></a>6.5.4.
     The Merge Table Options Section
    </h3></div></div><div></div></div><p>
     The <tt class="literal">Merge Table</tt> Options section is used to
     configure MERGE tables in MyISAM. To create a MERGE table, select
     MERGE as your storage engine in the
     <a href="#gui-table-editor-Table-Options" title="6.4.
    The Table Options Tab
   ">Table Options
     Tab</a> and then specify the tables you wish to MERGE in the
     <span class="guilabel">Union Tables</span> dialog.
    </p><p>
     You can also specify the action the server should take when users
     attempt to perform INSERT statements on the merge table. See
     <a href="http://dev.mysql.com/doc/mysql/en/MERGE.html" target="_top">http://dev.mysql.com/doc/mysql/en/MERGE.html
     for more information on MERGE tables.</a>
   </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gui-table-editor-advanced-options-raid-options"></a>6.5.5.
     The Table RAID Settings Section
    </h3></div></div><div></div></div><p>
     The <tt class="literal">Table RAID Settings</tt> section allows you to
     configure RAID support for MyISAM tables. RAID allows MyISAM table
     data files to grow larger than the 2GB/4GB size limit imposed by some
     operating systems.
    </p><p>
     For more information on using RAID support with MyISAM, see
     <a href="http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html" target="_top">http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html</a>
   </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="gui-table-editor-changes"></a>6.6.
    Applying Your Changes
   </h2></div></div><div></div></div><p>
    The changes you make with the MySQL Table Editor are not immediately
    applied but are instead queued to be applied in batches after you
    have made all your edits.
   </p><p>
    To apply the changes you have made, click the <span class="guibutton">Apply
    Changes</span> button. The <tt class="literal">Confirm Table
    Edit</tt> dialog will appear.
   </p><div class="figure"><a name="id4741826"></a><p class="title"><b>Figure6.4.
     The Confirm Table Edit dialog
    </b></p><div><img src="images/confirmchanges.png" alt="The Confirm Table Edit dialog"></div></div><p>
    You can click the <span class="guibutton">Execute</span> button to confirm
    the changes and have them applied, or click the
    <span class="guibutton">Cancel</span> button to discard the changes. You can
    also click the <span class="guibutton">Discard Changes</span> button in the
    main MySQL Table Editor window to discard all changes you have made.
   </p><p>
    You can also copy the proposed changes to the clipboard for further
    editing by highlighting the ALTER TABLE or CREATE TABLE statement,
    right-clicking and choosing <span class="guimenu">Copy</span> from the
    drop-down menu.
   </p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="mysql-gui-options"></a>Chapter7.
 Options Dialog
</h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#mysql-gui-options-introduction">7.1. 
  Introduction
 </a></span></dt><dt><span class="sect1"><a href="#mysql-gui-options-general-options">7.2. 
  General Options
 </a></span></dt><dt><span class="sect1"><a href="#mysql-gui-options-connections">7.3. 
  Connections
 </a></span></dt><dt><span class="sect1"><a href="#mysql-gui-options-editors">7.4. Editors</a></span></dt><dt><span class="sect1"><a href="#gui-options-query-browser">7.5. 
  The Browser Section
 </a></span></dt><dd><dl><dt><span class="sect2"><a href="#gui-options-query-browser-display-options">7.5.1. 
   Display Options
  </a></span></dt><dt><span class="sect2"><a href="#gui-options-query-browser-query-options">7.5.2. 
   Query Options
  </a></span></dt><dt><span class="sect2"><a href="#gui-options-query-browser-various">7.5.3. 
   Various
  </a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-gui-options-introduction"></a>7.1.
  Introduction
 </h2></div></div><div></div></div><p>
  The <tt class="literal">Options</tt> dialog allows you to configure
  connection profiles, general program settings, and more. You can open
  the <tt class="literal">Options</tt> dialog window using one of the
  following methods:

  </p><div class="itemizedlist"><ul type="disc"><li><p>
    In the connection dialog window, click the
    <span class="guibutton">...</span> button.
   </p></li><li><p>
    In the main application window select <span class="guimenu">Options ...</span>
    from the <span class="guimenu">Tools</span> menu.
   </p></li></ul></div><p>

  </p><div class="figure"><a name="id4743064"></a><p class="title"><b>Figure7.1.
    Options dialog
   </b></p><div><img src="images/options.png" alt="Options dialog"></div></div><p>

  In the sidebar of that dialog, you can select the section you wish to
  configure. There are three action buttons in the lower right
  corner of the window:

  </p><div class="itemizedlist"><ul type="disc"><li><p>
    <span class="guibutton">Apply Changes</span> applies and saves changes.
   </p></li><li><p>
    <span class="guibutton">Discard Changes</span> discards any changes you have
    made.
   </p></li><li><p>
    <span class="guibutton">Close</span> closes the <tt class="literal">Options</tt>
    dialog window. If you have not applied or discarded your changes, you will be prompted to do so.
   </p></li></ul></div><p>
 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-gui-options-general-options"></a>7.2.
  General Options
 </h2></div></div><div></div></div><p>
  The <tt class="literal">General Options</tt> section allows you to specify a
  number of settings that are valid for all graphical MySQL applications. At the time of writing, MySQL Administrator and MySQL Query Browser are the only programs in the MySQL
  GUI suite, but other programs will follow soon.</p><div class="itemizedlist"><ul type="disc"><li><p>
    <tt class="literal">Store Window Positions</tt>: When an application is
    started the next time, its recent window positions will be reused.
   </p></li><li><p>
    <tt class="literal">Show Tip of Day</tt>: If checked, a pop-up window with
    the tip of the day appears at program startup.
   </p></li><li><p>
    <tt class="literal">Store Passwords</tt>: If checked, passwords are stored
    in the user's connection profile. In this case, you can
    select the password storage method:
   </p><p>
    <tt class="literal">Plaintext</tt> means they are stored without
    encryption; this can be insecure. <tt class="literal">Obscured</tt> means
    they are encrypted using a weak algorithm. This encryption method,
    however, is operating system independent. Selecting <tt class="literal">OS Specific</tt> will use the default encryption method provided by your operating system. The default option is <tt class="literal">Plaintext</tt>.
   </p></li><li><p>
    <tt class="literal">Language</tt>: Select the interface language. The
    default is <tt class="literal">English</tt>.
   </p></li><li><p>
    <tt class="literal">Default Font</tt>: The font used for all aplication text.</p></li><li><p>
    <tt class="literal">Data Font</tt>: The font used for all query and table data displayed.
   </p></li><li><p>
    <tt class="literal">Code Font</tt>: The font used for all queries entered by the user..
   </p></li><li><p>
<tt class="literal">Ignorelist</tt>: Whenever you check the <tt class="literal">Do Not Show This Message Again</tt> option on error and message prompts, they are added to this list. If you would like a particular message to be shown again, click the <span class="guibutton">Remove</span> button after selecting the message from the list.</p></li></ul></div><p>You may change the font and
    font size  of any of the application fonts by clicking the <span class="guibutton">Choose ...</span> button to the right of the font.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-gui-options-connections"></a>7.3.
  Connections
 </h2></div></div><div></div></div><p>
  The <tt class="literal">Connections</tt> section allows you to create,
  edit, and delete connection profiles. The center box displays a list
  of currently available profiles, together with a history of
  connections that were made without being stored in a profile. You can
  collapse or expand both the <tt class="literal">Connections</tt> and
  <tt class="literal">History</tt> trees by double-clicking them.
 </p><p>
  Connections are automatically added to the <tt class="literal">History</tt> tree whenever you establish a connection to a MySQL server without using one of the profiles stored under the <tt class="literal">Connections</tt> tree. They
  do not appear in the drop-down box of the
  <tt class="literal">Connection</tt> dialog, but you can use any of them by
  manually typing their name into the <tt class="literal">Connection</tt> box of the <tt class="literal">Connection</tt> dialog.
 </p><div class="figure"><a name="id4743394"></a><p class="title"><b>Figure7.2.
   Options dialog: Connections
  </b></p><div><img src="images/options-connection.png" alt="Options dialog: Connections"></div></div><p>
  To edit an existing connection profile, click on its name and change
  the values that appear in the <tt class="literal">Connection Parameters</tt>
  and <tt class="literal">Advanced Parameters</tt> tabs, then click on the
  <span class="guibutton">Apply Changes</span> button to save your changes.
 </p><p>
    When you select a connection profile from either the
  <tt class="literal">Connections</tt> or <tt class="literal">History</tt> trees, the
  <tt class="literal">Connection Parameters</tt> tab displays the following
  fields:

  </p><div class="itemizedlist"><ul type="disc"><li><p>
    <tt class="literal">Connection</tt>: The connection profile label. This is
    the name by which you refer to the profile and that appears in the
    <tt class="literal">Connection</tt> drop-down box of the Connection dialog. It may contain any characters, including spaces.
    Choose distinctive names so that you can easily tell which profiles
    they refer to. The names can help you distinguish connections to
    different MySQL servers, or connections as different MySQL users to
    a given server.</p></li><li><p>
    <tt class="literal">Username</tt>: The username used to connect to the
    MySQL server.
   </p></li><li><p>
    <tt class="literal">Password</tt>: The password used to connect to the
    MySQL server. Note that passwords are not stored in the connection
    profile, unless you specify otherwise in the
    <a href="#mysql-gui-options-general-options" title="7.2.
  General Options
 ">General
    Options section</a>.
   </p></li><li><p>
    <tt class="literal">Hostname</tt>: The name of the host machine where the
    MySQL server runs, or its IP address.
   </p></li><li><p>
    <tt class="literal">Port</tt>: The TCP/IP port that the MySQL server
    listens to on the host machine.
   </p></li><li><p>
    <tt class="literal">Type</tt>: Specifies the protocol used to connect to
    the database server. The default protocol is
    <tt class="literal">MySQL</tt> (which uses the native MySQL protocol). The
    other protocols listed are not currently available.
   </p></li><li><p>
    <tt class="literal">Schema</tt>: The default database for a connection when using the MySQL Query Browser.
   </p></li><li><p>
    <tt class="literal">Notes</tt>: You can use this field to enter comments
    or additional information describing the connection profile.
   </p></li></ul></div><p>
 </p><p>
  <span class="emphasis"><em>Note that the <tt class="literal">Advanced Parameters</tt> tab may
  not be available in some of the first releases of MySQL Administrator.
  If that is the case in the version you are using, you can still set
  those parameters in the Connection dialog. Use the <span class="guibutton">Details ...</span> button of
  that dialog to display the <tt class="literal">Advanced Connection
  Options</tt>.</em></span>
 </p><p>
  When you select a connection profile from either the
  <tt class="literal">Connections</tt> or <tt class="literal">History</tt> list, the
  <tt class="literal">Advanced Parameters</tt> tab displays the following
  checkboxes:

  </p><div class="itemizedlist"><ul type="disc"><li><p>
    <tt class="literal">Use compressed protocol</tt>: If checked, the
    communication between the application and the MySQL server will be
    compressed, which may increase transfer rates. This corresponds to starting a
    MySQL command-line tool with the <tt class="literal">--compress</tt>
    option.
   </p></li><li><p>
    <tt class="literal">Return number of found rows, not number of affected
    rows</tt>: By default, MySQL returns the number of rows changed
    by the last <tt class="literal">UPDATE</tt>, deleted by the last
    <tt class="literal">DELETE</tt> or inserted by the last
    <tt class="literal">INSERT</tt> statement. When this option is checked,
    the server returns the number of rows matched by the
    <tt class="literal">WHERE</tt> statement for <tt class="literal">UPDATE</tt>
    statements.
   </p></li><li><p>
    <tt class="literal">Ignore spaces after function names, make them reserved
    words</tt>: Normally, any refereence to a function name in an
    SQL statement must be followed immediately by anopening parenthesis.
    If this option is checked, spaces may appear between the function
    name and the parenthesis, like this:

</p><pre class="programlisting">
       COUNT (*)
      </pre><p>

    Enabling this option has the effect that function names become
    reserved words. This option corresponds to starting a MySQL
    command-line tool with the <tt class="literal">--ignore-spaces</tt>
    option.
   </p></li><li><p>
    <tt class="literal">Allow interactive_timeout seconds of inactivity before
    disconnect</tt>: Normally, the connection is closed by the
    MySQL server after a certain period of inactivity on the client
    side. This period can be set with the
    <tt class="literal">interactive_timeout</tt> variable.

    
    If checked, the server will not close the connection unless the
    period of inactivity exceeds the value set by
    <tt class="literal">interactive_timeout</tt>. This corresponds to starting
    a MySQL command-line tool with the
    <tt class="literal">--connect-timeout=<i class="replaceable"><tt>seconds</tt></i>
    </tt> option.
   </p></li><li><p>
    <tt class="literal">Enable LOAD DATA LOCAL handling</tt>: By default, the
    <tt class="literal">LOCAL</tt> option of the <tt class="literal">LOAD DATA</tt>
    statement is disabled for security reasons. Enabling this option
    will allow to load data from the local machine (the machine where the client GUI application is running). This option corresponds to starting a
    MySQL command-line tool with the <tt class="literal">--local-infile=1</tt>
    option. (Note that this option is ineffective unless the MySQL
    server allows <tt class="literal">LOCAL</tt> handling.)
   </p></li></ul></div><p>
 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-gui-options-editors"></a>7.4.Editors</h2></div></div><div></div></div><p>The <tt class="literal">Editors</tt> section is used to configure options specific to the different editors available within the MySQL GUI Suite. At the time of writing this is limited to the <a href="#gui-table-editor" title="Chapter6.
   The MySQL Table Editor
  ">MySQL Table Editor</a>.</p><div class="itemizedlist"><ul type="disc"><li><p><tt class="literal">Show SQL command before applying changes</tt> toggles whether the MySQL Table Editor will show you the <tt class="literal">ALTER TABLE</tt> statement it is about to execute for confirmation when you click <span class="guibutton">Apply Changes</span>.</p></li><li><p><tt class="literal">All columns Not Null per default</tt> determines whether the MySQL Table Editor will designate columns as being <tt class="literal">NOT NULL</tt> by default when creating new columns.</p></li><li><p><tt class="literal">All integer columns unsigned per default</tt> sets whether integer columns are declared <tt class="literal">UNSIGNED</tt> by default when creating new columns.</p></li><li><p><tt class="literal">PK Naming</tt> dictates the format that should be used to name <tt class="literal">PRIMARY KEY</tt> columns that are automatically generated. the <i class="replaceable"><tt>%tablename%</tt></i> portion will be replaced with the name of the appropriate table.</p></li><li><p><tt class="literal">Index Naming</tt> sets the name automatically generated for new indexes. The <i class="replaceable"><tt>%nr%</tt></i> string will be replaced with an automatically incrementing number.</p></li><li><p><tt class="literal">FK Naming</tt> configures the name used when creating new foreign keys.</p></li><li><p><tt class="literal">PK Datatype</tt> is the datatype used when creating a <tt class="literal">PRIMARY KEY</tt> column.</p></li><li><p><tt class="literal">Def. Datatype</tt> is the default datatype assigned to all new columns that are not part of a <tt class="literal">PRIMARY KEY</tt>.</p></li></ul></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="gui-options-query-browser"></a>7.5.
  The Browser Section
 </h2></div></div><div></div></div><p>
  The <tt class="literal">Browser</tt> section allows you to specify options
  that relate to the MySQL Query Browser. The <tt class="literal">Browser</tt>
  section is divided into three areas: <tt class="literal">Display
  Options</tt>, <tt class="literal">Query Options</tt>, and
  <tt class="literal">Various</tt>.
 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gui-options-query-browser-display-options"></a>7.5.1.
   Display Options
  </h3></div></div><div></div></div><p>
   The display options affect the appearance of the MySQL Query Browser.
  </p><p>
   <tt class="literal">Show advanced toolbars</tt> turns on and off the
   display of the <a href="#mysql-query-browser-tour-buttonbar" title="4.3.
    The Advanced Toolbar
   ">The
   Advanced Toolbar</a>.
  </p><p>
   <tt class="literal">Hide the tab when only one tab is open</tt>
   determines whether or not to display a tab icon at the top of the
   <a href="#mysql-query-browser-tour-resultarea" title="4.4.
    The Result Area
   ">Result
   Area</a> if there is only one active result area.
  </p><p>
   <tt class="literal">Toolbars use gradient background</tt> enables and
   disables use of gradient effects in the background of the
   <a href="#mysql-query-browser-tour-querybar" title="4.2.
    The Query Toolbar
   ">Query
   Toolbar</a>.
  </p><p>
   <tt class="literal">Show field overlay images for long VARCHAR, TEXT, and BLOG
   fields</tt> toggles on and off the BLOB management icons.
  </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gui-options-query-browser-query-options"></a>7.5.2.
   Query Options
  </h3></div></div><div></div></div><p>
   <tt class="literal">Enforce queries to be editable by adding primary key
   columns to the select</tt> will add <tt class="literal">PRIMARY
   KEY</tt> columns to a query that does not explicitly
   <tt class="literal">SELECT</tt> them to ensure that the results of a query
   can be edited. The <tt class="literal">PRIMARY KEY</tt> columns will not be
   displayed in this case, but will still be stored.
  </p><p>
   <tt class="literal">Open resultset in associated application after
   export</tt> will cause the associated application to be opened
   after choosing the <span class="guimenu">Expost Resultset</span> option from
   the right-click menu of the
   <a href="#mysql-query-browser-tour-resultarea" title="4.4.
    The Result Area
   ">Result
   Area</a>.
  </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gui-options-query-browser-various"></a>7.5.3.
   Various
  </h3></div></div><div></div></div><p>
   <tt class="literal">Associate sql/query files with Query Browser</tt>
   will configure Windows to associate all .sql files with the
   MySQL Query Browser. As a result, all such files will be opened with
   MySQL Query Browser by default.
  </p></div></div></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="mysql-gui-install-source"></a>AppendixA.Installing From Source</h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#mysql-gui-install-source-introduction">A.1. Introduction</a></span></dt><dt><span class="sect1"><a href="#mysql-gui-install-source-download">A.2. Downloading The Source Code</a></span></dt><dt><span class="sect1"><a href="#mysql-gui-install-source-windows">A.3. 
    Building from Source under Windows
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#mysql-gui-install-source-windows-prerequisites">A.3.1. 
     Prerequisites
    </a></span></dt><dt><span class="sect2"><a href="#mysql-gui-install-source-windows-compiling">A.3.2. 
     Compiling and Building
    </a></span></dt></dl></dd><dt><span class="sect1"><a href="#mysql-gui-install-source-linux">A.4. 
    Building from Source under Linux
   </a></span></dt><dd><dl><dt><span class="sect2"><a href="#mysql-gui-install-source-linux-prerequisites">A.4.1. 
     Prerequisites
    </a></span></dt><dt><span class="sect2"><a href="#mysql-gui-install-source-linux-compiling">A.4.2. 
     Compiling and Building
    </a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-gui-install-source-introduction"></a>A.1.Introduction</h2></div></div><div></div></div><p>
    Normally, you will want to install the MySQL GUI tools from binaries. We put a lot of effort into making sure that our binaries are built with the best possible options. If, for whatever reason, you wish to compile the tools yourself, follow these instructions.
   </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-gui-install-source-download"></a>A.2.Downloading The Source Code</h2></div></div><div></div></div><p>
     You can get the source code of the MySQL GUI tools from our public
     BitKeeper trees. To be able to access trees, you have to have
     BitKeeper installed. BitKeeper is freely available from
     <a href="http://www.bitmover.com/" target="_top">Bitmover</a>. To
     run under Windows, BitKeeper requires Cygwin. If, during the
     installation process, BitKeeper finds that either Cygwin is not
     installed, or that the Cygwin version is too old, it will suggest
     to download and install Cygwin (or a newer version). You may,
     however, install Cygwin before installing BitKeeper. You can get
     Cygwin from
     <a href="http://www.cygwin.com/" target="_top">Cygwin.com</a>.
    </p><p>
     Our public BitKeeper trees that contain the MySQL GUI tools source
     code can be retrieved by the following BitKeeper commands:

</p><pre class="programlisting">
     bk clone bk://mysql.bkbits.net/mysql-administrator mysql-administrator
     bk clone bk://mysql.bkbits.net/mysql-gui-common mysql-gui-common
     bk clone bk://mysql.bkbits.net/mysql-query-browser mysql-query-browser
    </pre><p>

     You will need the <tt class="literal">mysql-gui-common</tt> tree regardless of which GUI tools you intend to build. The
     <tt class="literal">mysql-gui-common</tt> tree contains source and
     graphics files used for all MySQL GUI tools.</p><p>You can also download the source for the various GUI tools from the <a href="http://dev.mysql.com/downloads" target="_top">downloads page</a>.</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-gui-install-source-windows"></a>A.3.
    Building from Source under Windows
   </h2></div></div><div></div></div><p>Installing from source under Windows requires multiple commercial compilers and because of this it is preferable to install from binaries. If you meet the prerequisites needed you can build the MySQL GUI tools from source under Windows.</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-gui-install-source-windows-prerequisites"></a>A.3.1.
     Prerequisites
    </h3></div></div><div></div></div><p>
     To compile the MySQL GUI tools from source under Windows, you need
     Borland Delphi 7, Microsoft Visual Studio.NET 2003, and some libraries which
     are available on the internet as open source software. Make sure the programs <tt class="literal">DCC32.exe</tt> and <tt class="literal">DEVENV.exe /?</tt> can be launched from the command line.
    </p><p>You will need the following libraries to build from source:</p><div class="itemizedlist"><ul type="disc"><li><p>glib-2.0</p></li><li><p>libxml-2</p></li><li><p>mysql client libraries (4.0 or newer, 5.0 prefered)</p></li><li><p>pcre-1.4</p></li><li><p>MS Visual C runtime libraries 7.1</p></li><li><p>Java include files 1.4.2_04</p></li><li><p>Lua 5.0.2</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-gui-install-source-windows-compiling"></a>A.3.2.
     Compiling and Building
    </h3></div></div><div></div></div><p>
     Make sure you have cloned the <tt class="literal">mysql-administrator</tt>,
     <tt class="literal">mysql-gui-common</tt>, and <tt class="literal">mysql-query-browser</tt> trees, and that their local
     directories are located in the same directory, for example in
     <tt class="literal">Personal Files\MySQLGUI\</tt>.
    </p><p>The source files and libraries should be placed into the following tree structure:</p><pre class="programlisting">
  Working Directory
  |
  |- mysql-administrator
  |- mysql-gui-common
  |- mysql-query-browser
  |- mysql-gui-win-res
     |
     |-include
     | |
     | |-glib-2.0
     | |-java
     | | |
     | | |-win32
     | |
     | |-libxml
     | |-lua
     | |-mysql
     | |-pcre
     | |-windows
     |
     |-lib
       |
       |-glib-2.0
       |-java
       |-libxml
       |-lua
       |-mysql
       |-pcre
       |-windows
</pre><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="mysql-gui-install-source-windows-compiling-command-line"></a>A.3.2.1.Building from Command Line</h4></div></div><div></div></div><p>To build from the command line open a windows command line prompt and change into the main repository of the tool (i.e. for MySQL Administrator this is <tt class="literal">work\mysql-administrator</tt>). There are three batch-files to start the build:</p><div class="itemizedlist"><ul type="disc"><li><p>build_debug.cmd</p></li><li><p>build_release.cmd</p></li><li><p>build_commercial.cmd</p></li></ul></div><p>Execute one of those to generate a runtime image of the application. It will be generated in a <tt class="literal">bin\windows</tt> directory.</p><p>Another method is to doubleclick on one of the <tt class="literal">build_<i class="replaceable"><tt>buildtype</tt></i>.cmd</tt> files, where <i class="replaceable"><tt>buildtype</tt></i> is one of <tt class="literal">debug</tt>, <tt class="literal">release</tt>, and <tt class="literal">commercial</tt>. The <tt class="literal">commercial</tt> build script is for users with commercial licenses, and makes use of the commercial version of the MySQL client library.</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="mysql-gui-install-source-windows-compiling-ide"></a>A.3.2.2.Building from the IDE</h4></div></div><div></div></div><p>Before you can open any projects, you have to install these components. Otherwise some of the forms will not open and you will receive error messages.</p><p>To install the components, goto the <tt class="literal">mysql-gui-common\source\windows\</tt> directory. Copy the following directories to your Delphi source directory (<tt class="literal">C:\Program Files\Borland\Delphi7\Source\</tt>).</p><div class="itemizedlist"><ul type="disc"><li><p>png</p></li><li><p>SynEdit</p></li><li><p>TNT</p></li><li><p>UniCodeEditor</p></li><li><p>VirtualTreeview</p></li></ul></div><p>Then doubleclick each <tt class="literal">*.dpk</tt> file outlined below. It will open Delphi. Press compile and install to install the components. Repeat this for each <tt class="literal">*.dpk</tt> file.</p><div class="itemizedlist"><ul type="disc"><li><p>SynEdit\Packages\SynEdit_D7.dpk</p></li><li><p>TNT\Packages\TntUnicodeVcl_D70.dpk</p></li><li><p>VirtualTreeview\Packages\VirtualTreesD7D.dpk</p></li><li><p>UniCodeEditor\Packages\UniCodeEditorD7.dpk</p></li></ul></div><p>These components have to be installed via the <span class="guimenu">Install</span> option of the <span class="guimenu">Component</span> menu. Click on the <span class="guibutton">Browse</span> button and select the the files below. Press <span class="guibutton">OK</span> after each file.</p><div class="itemizedlist"><ul type="disc"><li><p>png\PNGImage.pas</p></li></ul></div><p>After installing the components you can open the projects as outlined below.</p><p>To build the application from the Delphi 7 IDE simply doubleclick the <tt class="literal">edit_xxxx.cmd</tt>. This will launch Delphi 7 and open the file. To generate the complete runtime image select <span class="guimenu">Build All Projects</span> option from the <span class="guimenu">Project</span> menu.</p><p>Like for building from command line there are three different files.</p><div class="itemizedlist"><ul type="disc"><li><p>edit_debug.cmd</p></li><li><p>edit_release.cmd</p></li><li><p>edit_commercial.cmd</p></li></ul></div><p>The runtime image will be generated in a <tt class="literal">bin\windows</tt> directory.</p><p><span class="emphasis"><em>Opening the Delphi project not using the <tt class="literal">edit_*.cmd</tt> script will lead to incorrect project settings and problems while building the projects.</em></span></p></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-gui-install-source-linux"></a>A.4.
    Building from Source under Linux
   </h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-gui-install-source-linux-prerequisites"></a>A.4.1.
     Prerequisites
    </h3></div></div><div></div></div><p>
     To be able to build the MySQL GUI tools from source, you need the
     following software:

     </p><div class="itemizedlist"><ul type="disc"><li><p>
       g++ development suite
      </p></li><li><p>
       gtk-2.x
      </p></li><li><p>
       gtkmm-2.0 or gtkmm-2.2
      </p></li><li><p>
       libglade-2.x
      </p></li><li><p>libxml-2.6.x</p></li><li><p> mysql client libraries (4.0 or newer, 5.0 prefered)</p></li><li><p> pcre-1.4</p></li><li><p> autoconf-2.54, automake-1.7.x</p></li></ul></div><p>
    
    In addition, you will need gtkhtml-3.0.x to build the MySQL Query Browser.
    </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mysql-gui-install-source-linux-compiling"></a>A.4.2.
     Compiling and Building
    </h3></div></div><div></div></div><p>To build any of the tools, you need to have the bk tree for <tt class="literal">mysql-gui-common</tt> and the tree for the desired app (i.e.: <tt class="literal">mysql-administrator</tt>, <tt class="literal">mysql-query-browser</tt>) in the same top-level directory.</p><p>First build <tt class="literal">mysql-gui-common</tt>:</p><div class="orderedlist"><ol type="1"><li><p>cd mysql-gui-common</p></li><li><p>sh ./autogen.sh</p></li><li><p>./configure --prefix=/opt/mysql-<i class="replaceable"><tt>administrator</tt></i></p></li><li><p>make</p></li><li><p>make install</p></li></ol></div><p>The <tt class="literal">--prefix</tt> option can have whatever value you want, normally one would specify <tt class="literal">/usr/local</tt> (the default) or <tt class="literal">/usr</tt>, but for making precompiled binaries, something in <tt class="literal">/opt</tt> might be more appropriate.</p><p>After you have successfully built <tt class="literal">mysql-gui-common</tt>, you can build the individual tools (in this example we will build mysql-administrator):</p><div class="orderedlist"><ol type="1"><li><p>cd mysql-administrator</p></li><li><p>sh ./autogen.sh</p></li><li><p>./configure --prefix=/opt/mysql-<i class="replaceable"><tt>administrator</tt></i></p></li><li><p>make</p></li><li><p>make install</p></li></ol></div><p>If everything went well, things should be properly built and installed.</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="mysql-gui-install-source-linux-compiling-static"></a>A.4.2.1.Building Static Binaries</h4></div></div><div></div></div><p>Building static binaries is non-trivial under Linux, due to the enormous amount of library dependencies that come from GNOME and associated libraries. Additionally:</p><div class="itemizedlist"><ul type="disc"><li><p>Many libraries do not come with their static (lib*.a) versions shipped, so we need to build them ourselves.</p></li><li><p>Some libraries can't be linked statically, such as glibc, because of libnss*.so.</p></li><li><p>Some libraries depend on data files and modules from the original package, esp. in case of gtk/gnome. Problems don't just appear when the user don't have these data files installed; things may not work if they use distributions that put data files in different paths.</p></li></ul></div><p>The current solution is to build a partially static binary, with the most common libraries left dynamically linked (<tt class="literal">glibc</tt> and <tt class="literal">gtk</tt>). <tt class="literal">gtkmm</tt>, <tt class="literal">gtksourceview</tt>, <tt class="literal">gtkhtml</tt> and dependencies (like gnome) are being linked statically. The ideal solution would be to build custom binaries for each major/chosen distribution, but we don't have time/resources for that at the moment.</p><p>To build these binaries:</p><div class="orderedlist"><ol type="1"><li><p>Look at the <tt class="literal">source/linux/static_make</tt> script for all the files that should be removed/moved out of <tt class="literal">/usr/lib</tt>.</p></li><li><p>Run the script.</p></li></ol></div><p>That's needed to force the linker to look for the static version of each library and also to explicitly list the dependency libs that were otherwise linked to the dynamic libs.</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="mysql-gui-install-source-linux-compiling-rpm"></a>A.4.2.2.Building RPMs</h4></div></div><div></div></div><p>For building RPMs, a spec file is already supplied and will be made automatically after <tt class="literal">./configure</tt> is ran. The spec file expects a source tarball with the following structure:</p><pre class="programlisting">mysql-administrator/ mysql-administrator/mysql-gui-common/* mysql-administrator/mysql-administrator/*</pre><p>The contents of each subdir is the entire bk tree for each tool (Windows specific files and bk metadata are optional, of course). You must make a tar.gz file and put it in <tt class="literal">/usr/src/redhat/SOURCES</tt> (or whatever is your rpm SOURCES directory).</p><p>Then, execute: <tt class="literal">rpmbuild -ba mysql-administrator.spec</tt></p><p>That should build the srpm and rpm files for the tool.</p></div></div></div></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="mysql-gui-appendix-troubleshooting"></a>AppendixB.
  Troubleshooting Application Errors
 </h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#mysql-gui-appendix-troubleshooting-connection-errors">B.1. 
   Troubleshooting Connection Errors
  </a></span></dt><dt><span class="sect1"><a href="#mysql-gui-appendix-troubleshooting-display-problems">B.2. 
   Troubleshooting Display Problems
  </a></span></dt></dl></div><p></p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-gui-appendix-troubleshooting-connection-errors"></a>B.1.
   Troubleshooting Connection Errors
  </h2></div></div><div></div></div><p>
   If an error occurs when you select a connection profile and attempt
   to establish a connection to the MySQL server named in the profile, a
   window containing error information will be displayed (see figure).
  </p><div class="figure"><a name="id4747174"></a><p class="title"><b>FigureB.1.
    Error message dialog
   </b></p><div><img src="images/connectionerror.png" alt="Error message dialog"></div></div><p>
   Normally, this means either that the credentials specified in the
   profile are wrong (wrong username, wrong password), or that you do
   not have privileges to connect to the MySQL server from the client
   machine. You can find more information about the error in the
   <a href="http://dev.mysql.com/doc/mysql/en/Access_denied.html" target="_top">Causes
   of <tt class="literal">Access denied</tt> Errors</a> section of the
   reference manual.
  </p><p>
   However, another cause of connection failure is that there might be a
   network problem that prevents you from reaching the machine where the
   MySQL server is running. For this reason, the error dialog provides a
   <span class="guibutton">PING</span> button. Clicking this button will send an
   ICMP PING request to the MySQL server host machine. If the host
   machine is available over the network, you will see something like
   this:

</p><pre class="programlisting">
    Reply from 127.0.0.1: Time=0ms TTL=128
    Reply from 127.0.0.1: Time=1ms TTL=128
   </pre><p>

   This would indicate that the machine is reachable, and that the cause
   of connection failure is not a network problem.
  </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-gui-appendix-troubleshooting-display-problems"></a>B.2.
   Troubleshooting Display Problems
  </h2></div></div><div></div></div><p>
   If, under Windows, the controls in the windows look somehow
   displaced, select <span class="guimenu">Start</span>, <span class="guimenu">Control
   Panel</span>, <span class="guimenu">Display</span>. Select the
   <span class="guilabel">Settings</span> tab and click the
   <span class="guibutton">Advanced...</span> button. Change your DPI settings
   to <tt class="literal">Normal (96 DPI)</tt>.
  </p><p>
   If, under Linux, messages and captions appear very big, your display
   resolution is probably set too high. Use
   <tt class="literal">gnome-font-properties</tt> to change your default font
   to a smaller value or go to <tt class="literal">Details</tt> and set your
   resolution to <tt class="literal">72</tt> or some other more appropriate
   value.
  </p></div></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="mysql-gui-appendix-store-connections"></a>AppendixC.
  How Connections Are Stored
 </h2></div></div><div></div></div><p>
  On Windows, connection profiles are stored in <tt class="literal">C:\Documents and
  Settings\<i class="replaceable"><tt>UserName</tt></i>\Application
  Data\MySQL</tt> directory, where
  <i class="replaceable"><tt>UserName</tt></i> is the name of the current Windows
  user. On Linux, the files are stored in the
  <tt class="literal">~/.mysqlgui</tt> directory. The settings are stored in a
  file called <tt class="literal">mysqlx_user_connections.xml</tt>. The
  contents of that file look like this:

</p><pre class="programlisting">

   &lt;?xml version="1.0"?&gt;
   &lt;user_connections&gt;
    &lt;last_connection&gt;1&lt;/last_connection&gt;
    &lt;password_storage_type&gt;2&lt;/password_storage_type&gt;
    &lt;user_connection&gt;
     &lt;connection_name&gt;&lt;/connection_name&gt;
     &lt;username&gt;root&lt;/username&gt;
     &lt;hostname&gt;localhost&lt;/hostname&gt;
     &lt;port&gt;3306&lt;/port&gt;
     &lt;schema&gt;&lt;/schema&gt;
     &lt;advanced_options/&gt;
     &lt;storage_path&gt;&lt;/storage_path&gt;
     &lt;notes&gt;&lt;/notes&gt;
     &lt;connection_type&gt;0&lt;/connection_type&gt;
     &lt;storage_type&gt;2&lt;/storage_type&gt;
     &lt;password&gt;&lt;/password&gt;
    &lt;/user_connection&gt;
    ...
  </pre><p>

  You can edit the file manually, but take care not to invalidate the
  XML. When applying changes by editing and saving the file, those
  changes will show up the next time you open the
  <a href="#mysql-gui-options-connections" title="7.3.
  Connections
 ">Connections</a>
  section of the <a href="#mysql-gui-options" title="Chapter7.
 Options Dialog
">Options
  Dialog</a>. You do not need to restart your application for the
  changes to take effect.
 </p><p>
  As a database administrator, you may also edit the file according to
  your preferences, and then copy it to any other machine running the
  MySQL GUI tools. This makes it easy to have identical connection
  profiles on all machines, without having to set up those profiles
  individually. All XML configuration files for the MySQL GUI Tools are
  cross-platform compatible and can be transferred between Windows and
  Linux machines.
 </p></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="mysql-gui-appendix-xml-files"></a>AppendixD.
  XML Files Common to the MySQL GUI Applications
 </h2></div></div><div></div></div><p>
  On Windows, XML files common to all MySQL GUI applications are stored in the
  <tt class="literal">C:\Documents and
  Settings\<i class="replaceable"><tt>UserName</tt></i>\Application
  Data\MySQL</tt> directory, where
  <i class="replaceable"><tt>UserName</tt></i> is the name of the current Windows
  user. On Linux, the files are stored in the
  <tt class="literal">~/.mysqlgui</tt> directory.

  </p><div class="itemizedlist"><ul type="disc"><li><p>
    <tt class="literal">mysqlx_common_options.xml</tt>: Stores options
    selected in the <a href="#mysql-gui-options" title="Chapter7.
 Options Dialog
">Options
    dialog</a>.
   </p></li><li><p>
    <tt class="literal">mysqlx_user_connections.xml</tt>: This file is
    described in
    <a href="#mysql-gui-appendix-store-connections" title="AppendixC.
  How Connections Are Stored
 ">How
    Connections are Stored</a>.
   </p></li></ul></div><p>
 </p></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="mysql-query-browser-appendix-xml-files"></a>AppendixE.
   XML Files Used by MySQL Query Browser
  </h2></div></div><div></div></div><p>
   Besides the <a href="#mysql-gui-appendix-xml-files" title="AppendixD.
  XML Files Common to the MySQL GUI Applications
 ">common
   files</a>, MySQL Query Browser uses a number of XML files for internal
   purposes.

   </p><div class="itemizedlist"><ul type="disc"><li><p>
     <tt class="literal">mysqlqb_functions.xml</tt>: Stores list of functions
     and operators for use in the
     <a href="#mysql-query-browser-tour-pandf-functionbrowser" title="4.6.3.
     The Function browser
    ">Function
     Browser</a>.
    </p></li><li><p>
     <tt class="literal">mysqlx_dbm_data types.xml</tt>: Stores a list of the
     available MySQL data types for use with auto-completion and with
     the <a href="#gui-table-editor" title="Chapter6.
   The MySQL Table Editor
  ">MySQL Table Editor</a>
    </p></li><li><p>
     <tt class="literal">mysqlx_dbm_charsets.xml</tt>: Stores the available
     MySQL character sets.
    </p></li><li><p>
     <tt class="literal">mysqlqb_history.xml</tt> : Stores the queries that
     make up the
     <a href="#mysql-query-browser-tour-objectbrowser-history" title="4.5.3.
     The History Browser
    ">History
     Browser</a>
    </p></li><li><p>
     <tt class="literal">mysqlqb_bookmark.xml</tt>: Stores the queries that
     form the
     <a href="#mysql-query-browser-tour-objectbrowser-bookmarks" title="4.5.2.
     The Bookmark Browser
    ">Bookmark
     Browser</a>
    </p></li></ul></div><p>
  </p></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="mysql-gui-appendix-notes-for-translators"></a>AppendixF.
  Notes for Translators
 </h2></div></div><div></div></div><p>
  You may find that the MySQL GUI tools and/or their documentation are
  not available in your preferred language. If you would like to
  translate the software, or its documentation, or participate in that
  translation, <span class="emphasis"><em>please contact the MySQL documentation team
  before starting your translation!</em></span>
 </p><p>
  The MySQL documentation team's address is
  <tt class="email">&lt;<a href="mailto:docs@mysql.com">docs@mysql.com</a>&gt;</tt>. In your mail, please state what you
  would like to translate (the tools, their documentation, or even the
  whole MySQL reference manual if you dare), and give some information
  regarding your background:

  </p><div class="itemizedlist"><ul type="disc"><li><p>
    What is your name?
   </p></li><li><p>
    In which country and city are you located?
   </p></li><li><p>
    How long have you used MySQL?
   </p></li><li><p>
    Have you done other translations?
   </p></li><li><p>
    Will you work alone, or with a group of translators?
   </p></li><li><p>
    What's your timetable regarding the translation?
   </p></li><li><p>
    What is your motivation for translating?
   </p></li></ul></div><p>

  We will get back to you as soon as possible.
 </p><p>
  The format used for both software and documentation is
  <span class="emphasis"><em>DocBook XML</em></span>. From that base format, all other
  available formats (HTML, CHM, PDF, etc.) are being generated. It would
  be a pity if you started translating, say, the HTML version of this
  documentation, because we will not be able to use it in that format.
  Also, you might find that someone else has already done (or is in the
  process of doing) that translation. So, once again, please contact the
  MySQL documentation team first!
 </p></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="mysql-gui-appendix-third-party-software"></a>AppendixG.
  Third-party Software Used by the MySQL GUI Tools
 </h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#mysql-gui-appendix-third-party-software-pcre">G.1. 
   PCRE Library
  </a></span></dt><dt><span class="sect1"><a href="#mysql-gui-appendix-third-party-software-png">G.2. 
   PNG Support
  </a></span></dt></dl></div><p>
  The MySQL GUI tools incorporate PCRE and PNG support through the use
  of third-party libraries.
 </p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-gui-appendix-third-party-software-pcre"></a>G.1.
   PCRE Library
  </h2></div></div><div></div></div><p>
   Regular expression support is provided by the PCRE library package,
   which is open source software, written by Philip Hazel, and copyright
   by the University of Cambridge, England. The source for the PCRE
   library can be found at:
   <a href="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/" target="_top">ftp:/
   /ftp.csx.cam.ac.uk/pub/software/programming/pcre/</a>.
  </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mysql-gui-appendix-third-party-software-png"></a>G.2.
   PNG Support
  </h2></div></div><div></div></div><p>
   PNG support for the Windows version is provided by the TPNGImage
   component which is open source software, written and copyright by
   Gustavo Daud. The source for the TPNGImage can be found at:
   <a href="http://pngdelphi.sourceforge.net" target="_top">
   http://pngdelphi.sourceforge.net </a>.
  </p></div></div></div></body></html>