[Kea-users] Host reservations in MySQL database

Christian Garling christian.garling at cg-networks.de
Thu Nov 10 07:02:04 UTC 2016

Am 09.11.2016 um 20:05 schrieb mrobti at insiberia.net:
> On 2016-11-09 10:19, Christian Garling wrote:
>> Hello,
>> I am setting up KEA as part of a provisioning system. Therefore I want
>> to use host reservations with MySQL to realize PXE boot of my
>> machines. My dataset consists of:
>> dhcp_identifier=x'ab12cd34ef56' (MAC address of the system in lower
>> case letters withouts colons)
> I'm still trying to make it work myself, but I think you have a 
> problem here.  That should be a binary string:
> dhcp_identifier = UNHEX(REPLACE('aa:bb:cc:dd:ee:ff', ':', ''))
Hm, is that way different to x'value'?
>> I did not find any format specification how to store the data above
>> correctly in the database. Specially the dhcp_identifier could be
>> wrong I think.
> I found this:
> https://kea.isc.org/wiki/HostReservationsHowTo
I found this too, but it does not specify the field types and it does 
not give an example how data should be stored.
>> I already enabled the MySQL general log and there I can see a lot of
>> queries from the KEA server, so the database connections seems to be
>> fine.
> By the way, do you happen to know how to make MySQL log show the 
> contents of the executed query? My log only shows the prepared format, 
> even when executing:
> Execute        SELECT host_id, dhcp_identifier, dhcp_identifier_type, 
> dhcp4_subnet_id, dhcp6_subnet_id, ipv4_address, hostname, 
> dhcp4_client_classes, dhcp6_client_classes FROM hosts WHERE 
> dhcp4_subnet_id = ? AND dhcp_identifier_type = ?    AND 
> dhcp_identifier = ?
I have this in my.cnf:

general_log_file        = /var/log/mysql/mysql.log
general_log              = 1

I can see queried values in my logfile. I am running CentOS 7 with MySQL 
5.7 Community Server.


> _______________________________________________
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users

More information about the Kea-users mailing list