The koha-mysql script provided with the Debian package currently does not check the <port> element in koha-conf.xml. Consequently, if one uses a non-standard port number for MySQL, koha-mysql cannot connect to the database even though Koha itself can. Teaching koha-mysql how to pass --port to the mysql command would fix it. I note that if/when the patches for bug 11974 make it in, it would be useful to also teach koha-mysql how to pass --socket.