From: Stephen Morris Date: Mon, 13 May 2013 14:56:58 +0000 (+0100) Subject: [2653] Added documentation as to how to create the test DHCP database X-Git-Tag: bind10-1.2.0beta1-release~444^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=298fd19fe3405ccc76d5d7ab8f91d80c53bcf44b;p=thirdparty%2Fkea.git [2653] Added documentation as to how to create the test DHCP database --- diff --git a/src/lib/dhcpsrv/database_backends.dox b/src/lib/dhcpsrv/database_backends.dox index 43594fd608..baab1dddd6 100644 --- a/src/lib/dhcpsrv/database_backends.dox +++ b/src/lib/dhcpsrv/database_backends.dox @@ -83,9 +83,42 @@ @subsection dhcp-mysql-unittest MySQL - A database called keatest needs to be set up using the MySQL - CREATE DATABASE command. A database user, also called keatest - (with a password keatest) must be given full privileges in that - database. The unit tests create the schema in the database before each test - and delete it afterwards. + A database called keatest must be created. A database user, also called + keatest (and with a password keatest) must also be created and + be given full privileges in that database. The unit tests create the schema + in the database before each test and delete it afterwards. + + In detail, the steps to create the database and user are: + + -# Log into MySQL as root: + @verbatim + % mysql -u root -p + Enter password: + : + mysql>@endverbatim\n + -# Create the test database. This must be called "keatest": + @verbatim + mysql> CREATE DATABASE keatest; + mysql>@endverbatim\n + -# Create the user under which the test client will connect to the database + (the apostrophes around the words keatest and localhost are + required): + @verbatim + mysql> CREATE USER 'keatest'@'localhost' IDENTIFIED BY 'keatest'; + mysql>@endverbatim\n + -# Grant the created user permissions to access the keatest database + (again, the apostrophes around the words keatest and localhost + are required): + @verbatim + mysql> GRANT ALL ON keatest.* TO 'keatest'@'localhost'; + mysql>@endverbatim\n + -# Exit MySQL: + @verbatim + mysql> quit + Bye + %@endverbatim + + The unit tests are run automatically when "make check" is executed (providing + that BIND 10 has been build with the --with-dhcp-mysql switch (see the installation + section in the BIND 10 Guide). */