If you upgrade to debian 9 from 8, be aware there are some serious issues with Mysql. Your old mysql from debian 8 definitely will not work. What I suggest you do is install something like virtualbox and create a virtual machine and install debian 9 on it and install trinitycore server there. Trying to work around what is already installed on your debian system is a pain.
ahandyman59