MySQL Learn MySQL the Quick and Easy Way 2nd edition Edition Ullman - Download the ebook today and own the complete content
MySQL Learn MySQL the Quick and Easy Way 2nd edition Edition Ullman - Download the ebook today and own the complete content
com
https://ebookgate.com/product/mysql-learn-mysql-the-quick-
and-easy-way-2nd-edition-edition-ullman/
OR CLICK BUTTON
DOWLOAD EBOOK
https://ebookgate.com/product/teach-yourself-visually-digital-video-
the-fast-easy-way-to-learn-2nd-edition-lonzell-watson/
ebookgate.com
https://ebookgate.com/product/mysql-4th-edition-paul-dubois/
ebookgate.com
https://ebookgate.com/product/php5-and-mysql-bible-tim-converse/
ebookgate.com
https://ebookgate.com/product/mysql-php-database-applications-2nd-ed-
edition-brad-bulger/
ebookgate.com
Beginning PHP and MySQL E Commerce 2nd Edition Edition
Cristian Darie
https://ebookgate.com/product/beginning-php-and-mysql-e-commerce-2nd-
edition-edition-cristian-darie/
ebookgate.com
https://ebookgate.com/product/mysql-phrasebook-1st-edition-edition-
greant/
ebookgate.com
https://ebookgate.com/product/php-and-mysql-web-development-luke-
welling/
ebookgate.com
https://ebookgate.com/product/mysql-reference-manual-1st-edition-
michael-widenius/
ebookgate.com
https://ebookgate.com/product/mysql-in-a-nutshell-1st-edition-dyer/
ebookgate.com
VISUAL QUICKSTART GUIDE
MySQL
Second Edition
Larry Ullman
Peachpit Press
Visual QuickStart Guide
MySQL, Second Edition
Larry Ullman
Peachpit Press
1249 Eighth Street
Berkeley, CA 94710
510/524-2178
510/524-2221 (fax)
Notice of Rights
All rights reserved. No part of this book may be reproduced or transmitted in any form by any means,
electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of
the publisher. For information on getting permission for reprints and excerpts, contact
permissions@peachpit.com.
Notice of Liability
The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has
been taken in the preparation of the book, neither the author nor Peachpit Press shall have any liability to any
person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the
instructions contained in this book or by the computer software and hardware products described in it.
Trademarks
Visual QuickStart Guide is a registered trademark of Peachpit Press, a division of Pearson Education.
MySQL is a registered trademark of MySQL AB in the United States and in other countries. Macintosh and
Mac OS X are registered trademarks of Apple Computer, Inc. Java is a registered trademark of Sun Microsystems,
Inc. Microsoft, Windows, Windows 95, Windows 98, Windows Me, Windows NT, and Windows XP are registered
trademarks of Microsoft Corp. Screenshots of Web sites in this book are copyrighted by the original holders.
All other trademarks are the property of their respective owners.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and Peachpit was aware of a trademark claim, the
designations appear as requested by the owner of the trademark. All other product names and services identified
throughout this book are used in editorial fashion only and for the benefit of such companies with no intention
of infringement of the trademark. No such use, or the use of any trade name, is intended to convey endorsement
or other affiliation with this book.
ISBN 0-321-37573-4
987654321
Table of Contents
Upgrading MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
v
Table of Contents
vi
Table of Contents
Table of Contents
Stored Routines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Using OUT Parameters . . . . . . . . . . . . . . . . . . . . . . 330
Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
vii
Table of Contents
Other . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
Index 449
viii
Introduction
i
In the midst of the Information Age, where
more and more data is being stored on
computers, the need for high-speed, reliable
databases has increased dramatically. For years,
large companies, such as Oracle, Microsoft,
and IBM, have been providing high-end data
Introduction
warehousing applications for mission-critical
work. These programs were used primarily
by Fortune 500 companies, which can afford
their extreme cost and personnel demands.
Meanwhile, within the open-source community,
a new wave of small, reliable, and inexpensive
database applications came to the market. Such
software, of which MySQL and PostgreSQL
are the best examples, gave common users
and developers on a budget a practical data-
base choice.
MySQL, fortunately, has left its modest begin-
nings in the dust, turning into a robust, reliable,
and easy-to-manage database application.
More astounding, MySQL has managed to
retain its open-source roots, continuing to be
available for some uses at no expense (although
check the licensing for your particular situa-
tion). MySQL’s capabilities and low cost explain
why major operations such as Yahoo!, the
United States Census Bureau, and NASA use
it within their organizations. But you, too,
can incorporate MySQL into your projects.
With MySQL: Visual QuickStart Guide, you
will be doing just that in no time!
ix
Introduction
What Is MySQL?
MySQL is the world’s most popular, and
some might argue best, open-source data-
base. In fact, more and more, MySQL is a
viable competitor to the pricey goliaths such
as Oracle and Microsoft’s SQL Server.
MySQL was created and is supported
by MySQL AB, a company based in Sweden
(www.mysql.com, Figure i.1). MySQL is a
database management system (DBMS) for Figure i.1 The MySQL home page, located at
relational databases (therefore, MySQL is an www.mysql.com, is where you can obtain the software,
view the manual, get support, and more.
RDBMS). A database is simply a collection
of (often interrelated) data, be it text, num-
bers, or binary files, that are stored and kept
organized by the DBMS. Technically, MySQL
is an application that manages files called
databases, but you will commonly hear the
term “database” applied equally to both the
What Is MySQL?
Pronunciation Guide
MySQL is technically pronounced “My
Ess Que Ell,” just as SQL should be said
“Ess Que Ell.” You will also hear people,
although never this author, pronounce it
as “My Sequel” and “Sequel.” This is tech-
nically incorrect. It’s a trivial issue, of
course, but a common question.
x
Introduction
What Is MySQL?
MySQL can work with tables as large as
eight million terabytes (since version 3.23)
on some operating systems and generally a
healthy 4 GB otherwise.
In the next section of this Introduction,
I discuss the very important topic of the
available MySQL versions. Which version
of MySQL you use will greatly impact your
experience, particularly what you can and
cannot do (as new features are added).
xi
Introduction
MySQL Versions Table i.1 Some of the significant new features, and in
which version of MySQL they were added.
MySQL, at the time of this writing, is on version MySQL Feature Introductions
5.0.19, with the significant upgrade version 5.1
Fe at u r e M y S Q L Ve r s i o n
due out later in 2006. Since the first edition
Full-Text Binary Mode Searches 4.0
of this book was written (in 2002), there have
Unions 4.0
been several important releases of MySQL:
Subqueries 4.1
4.0, 4.1, and 5.0. Each has added new features
Stored Procedures 5.0
to the software (Table i.1), while changing
Views 5.0
some functionality in the process. For this
Cursors 5.0
reason, I cannot stress this enough: it is
Triggers 5.0 and 5.1
vitally important that you know and remem-
ber what version of MySQL you are using.
In this book I will highlight features that are
new to, or have changed in, later versions of
MySQL. Paying attention to this will help
minimize problems and frustrations.
MySQL Versions
SQL Versions
SQL, which stands for Structured Query Language (depending upon whom you ask), is the
language used to interact with practically every database application. It is a standardized lan-
guage, meaning that the terms and syntax it supports depend upon the regulated standard.
The current SQL standard was released in 2003.
MySQL, like most database applications, adheres to the standards for the most part. MySQL
does not support a few features of standardized SQL and has its own particular terminology
as well. This is true for most database applications. In this book I focus only on MySQL’s
implementation of SQL. Almost every SQL command you learn here will be applicable to all
database applications, but there may be some minor distinctions. If you ever go from using
MySQL to using PostgreSQL or Oracle or SQL Server, you should be fine, but you’ll need to do
a little research to smooth the transition.
xii
Introduction
xiii
Introduction
Technical Requirements
In order to follow the discussions in this
book, there are a few, though not too
restricting, technical requirements. The
first, naturally, would be the MySQL software
itself. Fortunately, this is freely available and
runs on most operating systems (Figure i.6).
Chapter 1, “Installing MySQL,” will cover the
fundamentals of installing MySQL on three
popular operating systems: Windows, Linux,
and Mac OS X.
The bulk of the chapters involve administer-
Figure i.6 MySQL is available in versions designed to
ing and interacting with the database from run on almost every operating system, including
a command-line perspective. Whichever various types of Unix and Windows.
application on your operating system gives
you this access is acceptable, be it a DOS
Technical Requirements
xiv
Introduction
xv
Introduction
xvi
Installing MySQL
1
Obviously the first thing you’ll need to do to
begin using MySQL is install the software.
But because MySQL is an open-source data-
base application, you have more options when
it comes to installation than you would with
a commercial application. These choices
range from the very simple execution of an
installer to customizing and compiling your
own installation using MySQL’s source files
Installing MySQL
(the actual code MySQL is written in).
In this chapter I will cover basic installation
on the Windows, Macintosh, and Linux
operating systems. These three platforms
cover a large portion of the MySQL audience,
but the database is available on many other
platforms as well. Between the Windows
binary and the Linux source installation
instructions, you should have a good sense
of the various issues regardless of the oper-
ating system you are using.
This chapter covers downloading the software,
installing the server, and running the initial
setup and configuration. If you have problems
with any of the installation steps described
here, see Appendix A, “Troubleshooting,” or
the relevant sections of the MySQL manual.
1
Chapter 1
2
Installing MySQL
Figure 1.1 MySQL runs on the vast majority of available operating systems.
3
Chapter 1
4
Installing MySQL
5
Chapter 1
6
Installing MySQL
7
Chapter 1
Configuring MySQL
on Windows
Somewhat new to MySQL is the MySQL
Server Instance configuration wizard, a
graphical tool for customizing how MySQL
runs. It’s available starting with MySQL 5.0
and only on Windows.
The wizard is fairly simple to use, but it’s
pretty important, so I’ll run through it with
you. The end result will be the creation of a
my.ini file, which the MySQL server and Figure 1.6 Choose a configuration type: Detailed or
Standard.
utilities will use for their settings.
To configure MySQL on Windows:
1. Launch the configuration wizard.
You can access this immediately after
Configuring MySQL on Windows
8
Installing MySQL
If you have a firewall installed and run- ■ The MySQL configuration wizard can be
ning on your machine, you’ll most likely used to configure a new installation or to
need to tweak it in order for MySQL to reconfigure an existing MySQL installa-
run. This is necessary because a firewall, tion. After you’ve used it once, the next
by definition, limits access to your com- time it runs, you’ll be given the option
puter. MySQL, by default, uses the port to reconfigure the current instance or
3306, which may be blocked by the firewall. remove it entirely. Removing the configu-
ration only stops the MySQL service and
If you have problems, which may appear deletes the my.ini file; it does not delete
when the configuration wizard attempts the installed files or your databases.
to finish doing its thing, try temporarily
turning off your firewall to confirm that
is the source of the problem. If MySQL
works with the firewall disabled, you know
the firewall is the issue. The solution then
is to adjust the firewall’s settings to allow
communications through port 3306. How
you do this differs from one operating
system or firewall program to the next,
but a quick search through the applicable
firewall help files or Google will turn up
useful answers.
9
Chapter 1
Installing MySQL Table 1.2 After installing MySQL, you’ll have these
folders (all found within the main MySQL folder).
on Macintosh MySQL Layout on Mac OS X
Mac OS X uses a FreeBSD (Unix) foundation Subfolder Contains
10
Installing MySQL
11
Chapter 1
12
Installing MySQL
13
Chapter 1
14
Installing MySQL
15
Chapter 1
10. Move to the installation directory. Figure 1.18 After installing the databases, you will
cd /usr/local/mysql see these lines, telling you what steps to take to run
the server.
The next couple of steps will take place
from within the installed MySQL folder.
11. Install the default databases.
sudo bin/mysql_install_db
→ --user=mysql
This step will create the database MySQL
needs to function properly (called mysql)
along with an appropriately named test
database (called test). Once the script has
run, you will see a number of messages
regarding the software (Figure 1.18).
16
Installing MySQL
17
Chapter 1
Basic Configuration
Options
Because MySQL is open source and very
flexible in how it runs, there are numerous
ways you can configure the software. By
installing MySQL from the source files, as
I did on Linux, you can establish certain Figure 1.20 The MySQL manual details the most
parameters at the time of installation that common configuration options, while ./configure
affect how the software functions. For starters, --help gives the entire list.
18
Installing MySQL
19
Chapter 1
20
Installing MySQL
Upgrading MySQL
Eventually you might have the need to
upgrade your MySQL installation. When
doing so, it’s important to consider what
type of upgrade you’ll be making. If you are
staying within the same release series, going
from, say, 4.1.12 to 4.1.17 or from 5.0.3 to
5.0.4, that’s a relatively safe upgrade. If you
are changing the release series, 4.0.9 to 4.1.12
or 4.1.17 to 5.0.18, there’s a bit more to it.
The first type of upgrade is best if you want
the latest, most stable and secure version,
without any hassle. The second type of
upgrade is normally for the benefit of adding
features but has a higher potential for prob-
lems. MySQL recommends jumping only a
single release at a time (3.23 to 4.0, 4.0 to 4.1,
4.1 to 5.0, and so on).
The MySQL manual covers the specifics of
upgrading from one version of MySQL to
Upgrading MySQL
another in great detail so that you can be best
prepared as to what you might encounter.
The directions I give next are more general-
ized recommendations.
To upgrade MySQL:
1. Back up your existing MySQL data.
See Chapter 13, “MySQL Administration,”
for information about how to do this.
2. Stop the currently running MySQL server
daemon.
Technically, this isn’t required, especially
when upgrading within the same release
series (e.g., from 5.0.15 to 5.0.18), but I
do think it is a good idea. I will discuss
stopping the MySQL application more
specifically in Chapter 2.
continues on next page
21
Chapter 1
22
Running MySQL
2
Now that the MySQL software has been suc-
cessfully installed (presumably), it’s time to
learn how to start, stop, and basically admin-
ister your database server. Assuming that
you did not install just the client software
(e.g., as a Linux RPM), you now have a data-
base server as well as several different utilities
that will aid you in running and maintaining
your databases.
In this chapter I will first cover starting and
stopping MySQL on different operating sys-
Running MySQL
tems (Windows XP, Mac OS X, and Ubuntu
Linux). After that, I will go into important
administrative knowledge that you’ll need,
regardless of the platform in use. This includes
the introduction of two important applica-
tions: mysqladmin and the mysql client. During
these discussions you will set a root user pass-
word, which is vital to security, and learn how
to control user access to databases.
23
Chapter 2
Running MySQL on
Windows and Windows NT
Unfortunately, you cannot truly know that
MySQL has been successfully installed until
you’ve been able to actually start the database
server. Starting MySQL is a frequent place of
problems and confusion, especially for the
beginning or intermediate user. On the bright
side, MySQL is very stable and reliable once
you have it running, and it can remain up for
months at a time without incident. If you run Figure 2.1 You may have the option of installing
into difficulties in these steps, check the MySQL as a service when you configure the software.
“Starting MySQL” section of Appendix A,
“Troubleshooting.” Or, as always, search the
version of the MySQL manual that corresponds
to the version of MySQL that you installed.
When it comes to running MySQL on
Running MySQL on Windows and Windows NT
24
Running MySQL
25
Chapter 2
26
Running MySQL
27
Chapter 2
28
Other documents randomly have
different content
combination to break through the rules, obviously tending to
insurrection and a consequent renewal of bloodshed, we think it
proper that they should immediately be removed to separate prison
ships.’
We now come to the most rabid of the Frenchmen, General Pillet.
Pillet was severely wounded and taken prisoner at Vimiero in 1808,
and—in violation, he says, of the second article of the Convention of
Cintra, which provided that no French should be considered
prisoners of war, but should be taken out of Portugal with arms, &c.,
by British ships—was brought to England, with many other officers.
He was at once allowed to be on parole at Alresford, but, not
considering himself bound by any parole terms, attempted to escape
with Paolucci, Captain of the Friedland captured in 1808 by the
Standard and Active, but was recaptured and sent to the dépôt at
Norman Cross. Here his conduct was so reprehensible that he was
sent to the Brunswick at Chatham. From the Brunswick he tried to
escape in a vegetable boat, but this attempt failed, and it is to the
subsequent rigour of his treatment that must be attributed his
vitriolic hatred of Britain.
General Pillet is of opinion that the particular branch of the Navy
told off for duty on the prison ships was composed of the most
miserable scum of English society; of men who have either been
accomplices in or guilty of great crimes, and who had been given by
the magistrates the alternative of being marines or of being hanged!
He speaks of the Chatham hulks as abominably situated near foul
marshes—which is undeniably true. The quarters of the prisoners
were in no place high enough for a man to stand upright; fourteen
little ports, unglazed but barred, of seventeen inches square, on each
side of the deck, gave all the light and air obtainable. When they were
shut they were fast shut, so that during the winter months the
prisoners breathed foul air for sixteen hours a day. Hence they went
naked, and so, when the cold air was admitted the results were fatal.
The overcrowding of the hulks, says Pillet, was part of the great
Government design of killing the prisoners, and asserts that even a
London newspaper, quoting the opinion of a medical board in
London, said that the strongest of men, after six years’ life on the
hulks, must be physically wrecked for life.
The hammock space allowed was six feet in length, but swinging
reduced them to four and a half. Newcomers were often obliged to
sleep on the bare deck, as there was no other vacant space, and there
was no distinction of ranks. However, officers were generally able to
buy spaces, upon which practice Pillet remarks:
He declares that the air is so foul when the decks are shut up that
the candles will not burn, and he has heard even the guards call for
help when they have opened the hatches and the air has escaped. The
food he describes as execrable, so that the two boats which had the
monopoly of coming alongside to sell butter, tea, coffee, sugar,
potatoes, candles, and tobacco at a price one-third above that on
land, did a roaring trade. The general reply to complaints was that
any food was good enough for French dogs.
If they were badly fed, says Pillet, they were worse clothed.
Nominally they received every eighteen months a coat, waistcoat,
breeches, two pairs of stockings, two shirts, a pair of shoes, and a
cap. He declares he can prove that the prisoners did not receive this
complete rig-out once in four years, and that if a prisoner had any
rags of his own, or received any money, he got no clothes! What
clothes they did get were so badly made that they generally had to be
re-made. He says that at Portsmouth, where the hulk agent Woodriff
was at any rate conscientious enough to issue the clothes on the due
dates, his secretary would buy back the shirts at one shilling each,
and so, as Government paid three shillings each for them, and there
were at Portsmouth, Forton, and Portchester some twelve thousand
prisoners on the average, his ‘pickings’ must have been considerable!
In a note he gives the instance of the reply of Commander Mansell,
who commanded the prison-ship police at Chatham in 1813, when
the fact that not one quarter of the clothing due to the prisoners had
been delivered to them, was proved clearly: ‘I am afraid it is too true,
but I have nothing to do with it. I cannot help it.’
From the Carnet d’Étapes du Sergt.-Maj. Beaudouin, 31e demi-
brigade de ligne, I take the following account of life on the hulks.
Beaudouin says:
‘The difference between the land prisons and the hulks is very
marked. There is no space for exercise, prisoners are crowded
together, no visitors come to see them, and we are like forsaken
people. There is no work but the corvées to get our water, and to
scrape in winter and wash in summer our sleeping place. In a word,
only to see them is to be horrified. The anchorage at Chatham is
bounded by low and ill-cultured shores; the town is two miles away—
a royal dockyard where there is much ship-building. At the side of it
is a fine, new, well-armed fort, and adjoining it a little town named
Rochester, where there are two windmills, and two more in
Chatham. By the London road, three miles off, there are four
windmills. The people of this country are not so pleasant and kind as
in Scotland, in fact I believe “the sex” is not so beautiful.’
Very soon the Bristol was condemned and its prisoners transferred
to the Fyen, and at the same time the Rochester and Southwick were
replaced by the Canada and Nassau. On the Fyen were 850
prisoners, but during 1810 and 1811 a great many Chatham prisoners
were sent to Norman Cross and Scotland.
Beaudouin comments thus bitterly:
‘On the Sampson the prisoners refused to eat the food. The
English allowed them to exist two days without food. The prisoners
resolved to force the English to supply them with eatable provisions.
Rather than die of hunger they all went on deck and requested the
captain either to give them food or to summon the Commandant of
the anchorage. The brute replied that he would not summon the
Commandant, and that they should have no other provisions than
those which had been served out to them two days previously. The
prisoners refused to touch them. The “brigand” then said: “As you
refuse to have this food, I command you to return below immediately
or I will fire upon you.” The prisoners could not believe that he really
meant what he said and refused to go below.
‘Hardly had they made this declaration, when the Captain gave the
word to the guard to fire, which was at once done, the crowd being
fired upon. The poor wretches, seeing that they were being fired
upon without any means of defence, crowded hastily down, leaving
behind only the killed and wounded—fifteen killed and some twenty
wounded! Then the Captain hoisted the mutiny signal which brought
reinforcements from the other ships, and all were as jubilant as if a
great victory had been won.
‘I do not believe that any Frenchman lives who hates this nation
more than I do; and all I pray for is that I may be able to revenge
myself on it before I die.’
LXIV
‘The ruin of their comrades and the depravities which were daily
committed in public, impressed right thinking men with so frightful
force that this place means a double suffering to them.’
In 1812 it was reported that a batch of incurables would be sent
home to France, and Beaudouin resolved to get off with them by
making himself ill. He starved himself into such a condition that he
was sent into hospital, but the doctor would not pass him as an
incurable. He swallowed tobacco juice, and at last, in a miserable
state, turned up with the candidates. Then it was announced that no
privateersmen, but only regular seamen, would be sent. Beaudouin,
being a soldier, and being among the privateersmen, was in despair.
However, a kindly English doctor pitied him, cured him of his self-
inflicted illness, and got him leave to go.
On June 2, 1812, he was ready to sail, but was searched first for
letters. Luckily none were discovered, although he had sixty sewn
between the soles of his shoes, and 200 in a box with a double
bottom. He sailed on June 4, the king’s birthday—that day eight
years previously he had arrived at Greenock amidst the Royal salutes
—arrived at Morlaix, and so home to Boiscommun (Loiret), canton of
Beaune-la-Rolande, arrondissement of Pithiviers.
The following experiences of an American prisoner of war are from
The Journal of a Young Man of Massachusetts, (1816), who was a
surgeon, by name Benjamin Waterhouse, captured at sea in May
1813, and confined on Melville Island, Halifax, whence he was
transported to Chatham, and then to Dartmoor. The account is
interesting as showing the very marked difference between the
American and the French prisoners of war, and is otherwise
remarkable for the hatred and contempt of the writer for Britons in
general and for Scotsmen in particular, entire pages being devoted to
their vilification. Waterhouse, with a hundred of his countrymen,
was shipped to England on the Regulus, and his complaints are
bitter about the shameful treatment on board—the filth, the semi-
starvation, the vermin, the sleeping on stone ballast, the lack of air
owing to the only opening to the lower deck being a hatchway two
feet square, the brutal rule of allowing only two prisoners to go on
deck at a time, and the presence in their midst of the only latrine.
The captain, a Scotsman, would only yield to constant petitions and
remonstrances so far as to sanction the substitution of iron bars for
the hatchway.
After a miserable voyage the prisoners reached Portsmouth, and,
starved, vermin-eaten, and in rags, were shipped off to the Crown
Prince, Captain Hutchison, at Chatham, where were thirteen other
prison ships and some 1,200 Americans. On this hulk, Waterhouse
says, they fared ‘as well as could be expected ... not that we fared so
well as British prisoners fare in America’, the daily allowance being
half a pound of beef, one gill of barley, one and a half pounds of
bread, on five days of the week, and on the others one pound cod
fish, and one pound potatoes, or one pound smoked herring, porter
and beer being purchasable. He dilates bitterly on the extraordinary
lack of humanity in John Bull, as evidenced by the hard fare of
soldiers and sailors, the scoundrelism of some officers, especially
those of the provisioning departments, and, above all, the shockingly
cruel punishments in the Army and Navy. During the daytime, he
says, life on a prison ship was not so unpleasant, but at night the
conditions were very bad—especially as American prisoners were
more closely watched and guarded than were men of other
nationalities. ‘The French were always busy in some little mechanical
employ, or in gaming, or in playing the fool, but the Americans
seemed to be on the rack of invention to escape.’
Amongst themselves, the Americans elected by voting, every four
weeks, a President, and twelve Committee men, whose functions
were to make wholesome laws, to define crimes and award
punishments, and particularly to insist upon personal cleanliness.
The punishments were fines, whippings, and in very extreme cases
the Black Hole. The volubility and the eloquence of the orators at
these Committee Meetings very much impressed the British officers.
The Frenchmen, Waterhouse says, were almost to a man gamblers:
‘Their skill and address at these games of apparent hazard were far
superior to the Americans. They seemed calculated for gamesters;
their vivacity, their readiness, and their everlasting professions of
friendship were nicely adapted to inspire confidence in the
unsuspecting American Jack Tar, who has no legerdemain about
him. Most of the prisoners were in the way of earning a little money;
but almost all of them were deprived of it by the French gamesters.
Our people stood no chance with them, but were commonly stripped
of every cent, whenever they set out seriously to play with them. How
often have I seen a Frenchman capering, singing, and grinning in
consequence of his stripping one of our sailors of all his money; ...
the officers among them are the most adroit gamesters. We have all
tried hard to respect them; but there is something in their conduct so
much like swindling, that I hardly know what to say of them. When
they knew that we had received money for the work we had been
allowed to perform, they were very attentive, and complaisant and
flattering.... They would come round and say: “Ah! Boston fine town,
very pretty—Cape Cod fine town, very fine! Town of Rhode Island
superb! Bristol Ferry very pretty! General Washington très grand
homme, General Madison brave homme!” With these expressions
and broken English, they would accompany, with their monkey
tricks, capering and grinning and patting us on the shoulder, with:
“The Americans are brave men—fight like Frenchmen;” and by their
insinuating manners allure our men once more to their wheels of
fortune and billiard-tables, and as sure as they did, so sure did they
strip them of all their money.’
Waterhouse adds that ‘if an American, having lost all his money,
wanted to borrow of a Frenchman under promise of repayment, the
latter would say: “Ah mon ami! I am sorry, very sorry, indeed; it is la
fortune de guerre. If you have lost your money you must win it back
again; that is the fashion in my country—we no lend, that is not the
fashion!”...
‘There were here some Danes as well as Dutchmen. It is curious to
observe their different looks and manners.... Here we see the thick-
skulled plodding Dane, making a wooden dish; or else some of the
most ingenious making a clumsy ship; while others submitted to the
dirtiest drudgery of the hulk, for money; and there we see a
Dutchman, picking to pieces tarred ropes ... or else you see him lazily
stowed away in some corner, with his pipe ... while here and there
and every where, you find a lively singing Frenchman, working in
hair, or carving out of a bone, a lady, a monkey, or the central figure
of the crucifixion! Among the specimens of American ingenuity I
most admired their ships, which they built from three to five feet
long.... Had not the French proved themselves to be a very brave
people, I should have doubted it by what I have observed of them on
board the prison-ship. They would scold, quarrel and fight, by
slapping each other’s chops with the flat hand, and cry like so many
girls.... Perhaps such a man as Napoleon Bonaparte could make any
nation courageous.’
Very bitter were the complaints of the Americans about the supine
and indifferent attitude towards them of Beasley, their agent, who
was supposed to keep constant watch and ward over the interests of
his unfortunate countrymen. He lived in London, thirty-two miles
away, paid no attention to complaints forwarded to him, and was
heartily hated and despised. Once he paid a visit to the hulks in
Gillingham Creek, but seemed anxious to avoid all interviews and
questionings, and left amidst a storm of hisses and jeers.
Waterhouse dwells severely on the fact that the majority of the
Americans on the Crown Prince and the other hulks were not men
who had been fairly taken in open combat on the high seas, but men
who had been impressed into the British Navy from American
merchant ships previous to the war between the two countries and
who, upon the Declaration of War, had given themselves up as
prisoners of war, being naturally unwilling to fight against their own
country, but who had been kept prisoners instead of being
exchanged. This had been the British practice since 1755, but after
the War of Independence it had ceased. All the same the British
authorities had insisted upon the right of search for British subjects
on American ships, and to the arbitrary and forcible exercise of this
‘right’ was very largely owing the War of 1812.
Waterhouse admits that on the whole he was treated as well on the
Crown Prince as were the British prisoners at Salem or Boston.
Recruiting sergeants for the British service came on board and tried
to tempt Americans with a bounty of sixteen guineas, but they were
only chaffed and sent off.
Later on, 500 more prisoners arrived from America in a pitiable
condition, mostly Maryland and Pennsylvania men—‘Colonel
Boerstler’s men who had been deceived, decoyed and captured near
Beaver Dams on January 23rd, 1813’. With their cruel treatment on
board the Nemesis on their trans-Atlantic voyage, Waterhouse
contrasts favourably the kind treatment of the prisoners brought by
the Poictiers 74, Captain Beresford, after his capture of the American
Wasp and her prize the Frolic.
The author gives a glaring instance of provision cheating. By the
terms of his contract, if the bread purveyor failed to send off to the
hulks fresh bread when the weather was favourable, he forfeited half
a pound of bread to each man. For a long time the prisoners were
kept in ignorance of this agreement, but they found it out, and on the
next occasion when the forfeit was due, claimed it. Commodore
Osmore refused it, and issued hard ship’s bread. The prisoners
refused to take it. Osmore was furious, and ordered his marines to
drive the prisoners, now in open mutiny, below. A disturbance was
imminent, but the Americans remained firm, and the commodore
gave way.
The American prisoners took in newspapers, as they were mostly
intelligent and well-educated men, but paid dearly for them.
The papers were the Statesman, Star, Bell’s Weekly Messenger,
and Whig. The Statesman cost 28s. a month, plus 16s. a month for
conveyance on board.
As the weather grew milder, matters were more comfortable on
board until small-pox broke out. Vaccination was extensively
employed, but many prisoners refused to submit to it, not from
unbelief in its efficacy, but from misery and unwillingness to live!
Then came typhus, in April 1814. There were 800 prisoners and 100
British on the ship. The hospital ship being crowded, part of the
Crown Prince was set apart for patients, with the result that the
mortality was very high. Still Beasley, the American agent, never
came near the ship to inquire into affairs.
The gambling evil had now assumed such proportions that the
Americans determined to put it down. In spite of the vigorous
opposition of the Frenchmen, the ‘wheels of fortune’ were abolished,
but the billiard-tables remained, it being urged by the Frenchmen
that the rate of a halfpenny per game was not gambling, and that the
game afforded a certain amount of exercise. There remained,
however, a strong pro-gambling party among the Americans, and
these men insisted upon continuing, and the committee sent one of
them to the Black Hole without a trial. This angered his mates; a
meeting was held, violent speeches were made in which the names of
Hampden, Sidney, and Wilkes were introduced, and he was brought
out. He was no ordinary rough tar, but a respectable well-educated
New England yeoman, with the ‘gift of the gab’; and the results of his
harangue were that the committee admitted their error, and he was
released.
Finally the billiard-tables were abolished; a great improvement
was soon manifest among the captives, education was fostered, and
classes formed, although a few rough characters still held aloof, and
preferred skylarking, and the slanging and chaffing of passers-by in
boats on the river.
In May 1814 four men went on deck and offered themselves for
British service. Two got away, but two were caught by their mates,
tried, and sentenced to be marked with indian ink on their foreheads
with the letter T (= Traitor). The Frenchmen were now being shipped
home. Some of them had been prisoners since 1803. Waterhouse
comments upon the appalling ignorance among English people in
the educated class of all matters American, and quotes the instance
of the lady who, wishing to buy some of the articles made by the
American prisoners, was confronted by the difficulty of ‘not knowing
their language’!
Waterhouse describes the surroundings of the Crown Prince thus:
‘The Medway is a very pleasant river ... its banks are rich and
beautiful.... The picture from the banks of the river to the top of the
landscape is truly delightful, and beyond any thing I ever saw in my
own country, and this is owing to the hedges.... Nearly opposite our
doleful prison stands the village of Gillingham, adorned with a
handsome church; on the side next Chatham stands the castle,
defended by more than an hundred cannon.... This place is noted for
making sulphate of iron.... Near to this village of Gillingham is a neat
house with a good garden, and surrounded by trees, which was
bequeathed by a lady to the oldest boatswain in the Royal Navy.’
‘Cher Monsieur:
‘S’il est cruel d’être livré aux dégoûts et aux peines que cause la
captivité la plus dure, il est bien doux de trouver des êtres sensibles
qui, comme vous, cher Monsieur, savent plaindre le sort rigoureux
des victimes de la guerre. Ce que vous avez eu la bonté de m’envoyer,
plus encore, l’expression des beaux sentiments me touche, me
pénètre de la plus vive reconnaissance, et me fait sentir avec une
nouvelle force cette vérité constante:—L’Humanité rapproche et unit
tous les cœurs faits pour elle. Comme vous, cher Monsieur, et avec
vous, je désire avec ferveur que les principes de notre Divin
Législateur reprennent leur Empire sur la terre, la conséquence en
est si belle!
‘Dieu vous garde beaucoup d’années.
‘Farbouriet, Colonel 12me Hussards.’
‘July 20th, 1801. In a cartel vessel which arrived last week from
France, came over one Stephen Buckle, a waterman of this town.
Three gentlemen had hired this waterman to take them to the Isle of
Wight, and they had not proceeded farther than Calshot Castle when
they rose upon him, gagged him, tied him hand and foot, and
threatened him with instant death if he made the slightest noise or
resistance. The boatman begged for mercy, and promised his
assistance in any undertaking if they would spare his life; on which
he was released, and was told they were French prisoners, and
ordered to make for the nearest port in France, at his peril. The
darkness of the night, and the calmness of the wind, favoured their
intentions, for after rowing two days and nights in a small, open
skiff, without having the least sustenance, they arrived safe at
Cherbourg. The waterman was interrogated at the Custom House as
to the prisoners’ escape; when, after giving the particulars and
identifying the persons, saying they threatened to murder him, the
officers took the three Frenchmen into custody, to take their
respective trials. The poor man’s case being made known to the
Government, he was ordered to be liberated, and his boat restored.’
ebookgate.com