|
|
|
You must move the wordhoard
directory into your MySQL data directory to install the database.
First shut down MySQL. Then become superuser. Move the wordhoard
directory into your MySQL data directory. Change the owner and group of the directory and all the files inside it to match your other MySQL data directories and files. Get out of superuser mode. Restart MySQL.
% mysql-stop % su Password: # mv wordhoard $MYSQL_DATA # cd $MYSQL_DATA # chown -R mysql wordhoard # chgrp -R wheel wordhoard # <ctrl>d % mysql-start
The username mysql
and group wheel
are the values used on our system. They might be different on your system, so adjust the example above accordingly.
Don't worry about endian issues. We've successfully moved the database from a big-endian PowerPC Mac to a little-endian Intel Windows box using this technique.
Run the MySQL command line client. Test the database to make certain you installed it correctly.
% mysql mysql> use wordhoard; mysql> show tables; +-----------------------------+ | Tables_in_wordhoard | +-----------------------------+ | annotation | | annotationcategory | | author | | authors_works | | bensonlemma | | bensonlempos | | bensonpos | | corpus | | corpus_tconviews | | lemma | | lemmacorpuscounts | | lemmaworkcounts | | lempos | | line | | metricalshape | | phrase | | phrase_wordtags | | phraseset_phrases | | phrasesetphrasecount | | phrasesettotalwordformcount | | pos | | query | | speaker | | speech | | speech_speakers | | tconcategory | | tconcategory_worktags | | tconview | | tconview_categories | | tconview_worktags | | textwrapper | | totalwordformcount | | word | | wordclass | | wordcount | | wordformcounts | | wordpart | | wordset | | wordset_wordtags | | wordset_workparttags | | wordset_worktags | | wordsettotalwordformcount | | wordsetwordcount | | workpart | | workpart_children | | workpart_translations | | workset | | workset_workparttags | +-----------------------------+ 48 rows in set (0.01 sec) mysql> describe corpus; +-------------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------------+--------------+------+-----+---------+-------+ | id | bigint(20) | NO | PRI | | | | tag | varchar(255) | YES | MUL | NULL | | | title | varchar(255) | YES | | NULL | | | charset | tinyint(4) | YES | | NULL | | | posType | tinyint(4) | YES | | NULL | | | taggingData_flags | bigint(20) | YES | | NULL | | | numWorkParts | int(11) | YES | | NULL | | | numLines | int(11) | YES | | NULL | | | numWords | int(11) | YES | | NULL | | | maxWordPathLength | int(11) | YES | | NULL | | | translations | varchar(255) | YES | | NULL | | | tranDescription | text | YES | | NULL | | | ordinal | int(11) | YES | | NULL | | +-------------------+--------------+------+-----+---------+-------+ 13 rows in set (0.03 sec) mysql> select id, tag, title from corpus; +----+------+------------------+ | id | tag | title | +----+------+------------------+ | 0 | ege | Early Greek Epic | | 1 | cha | Chaucer | | 2 | spe | Spenser | | 3 | sha | Shakespeare | +----+------+------------------+ 4 rows in set (0.00 sec) mysql> select count(*) from word; +----------+ | count(*) | +----------+ | 1793099 | +----------+ 1 row in set (0.48 sec) mysql> quit
The next step is to create the MySQL grants that WordHoard requires. To do this, run the mysql-client-grants
script:
% scripts/mysql-client-grants.csh
This script grants the select
privilege on the wordhoard
database to the account with username wordhoard
and password wordhoard
, from any host on the Internet. This makes the wordhoard
database world readable, but not writable.
The last step is to set some configuration parameters for MySQL. In particular, WordHoard requires a larger value for the max_allowed_packet
system variable than the default value of 1M. We use the MySQL my.cnf
configuration file to set this variable to 16M:
% mysql-stop % su Password: # cd /usr/local/mysql # cat >my.cnf [mysqld] max_allowed_packet=16M # <ctrl>d # chown mysql my.cnf # chgrp wheel my.cnf # <ctrl>d % mysql-start % mysql mysql> select @@max_allowed_packet; +----------------------+ | @@max_allowed_packet | +----------------------+ | 16776192 | +----------------------+ 1 row in set (0.07 sec) mysql> quit
The path /usr/local/mysql
, username mysql
, and group wheel
may be different on your system. Adjust the example above accordingly.
|
|
|