This may be the problem of V1.7 core. Until V1.6 database connection was standard mysql_connect, but it was changed to mysqli_connect in V1.7. In case of mysql_connect, port is included in host name. Therefore, you could set port at QA_MYSQL_HOSTNAME of qa-config.php (e.g. 127.0.0.1:3306). However, that setting is not possible in now V1.7.
Solution 1 (Setting example):
Change "mysqli.default_port" from 3306 to 3307 etc in your php.ini. If another program on same server is using the default port, you can not use this method.
Solution 2 (Hack example):
Change L64 - L66 in qa-include/qa-db.php
$db = new mysqli('p:'.QA_FINAL_MYSQL_HOSTNAME, QA_FINAL_MYSQL_USERNAME, QA_FINAL_MYSQL_PASSWORD, QA_FINAL_MYSQL_DATABASE, 3307);
else
$db = new mysqli(QA_FINAL_MYSQL_HOSTNAME, QA_FINAL_MYSQL_USERNAME, QA_FINAL_MYSQL_PASSWORD, QA_FINAL_MYSQL_DATABASE, 3307);
I think core developers need to fix this problem.