Don’t know if this is still needed for you, but I figured I would chime in since I ran into the same problem and let you know how we solved it.
A colleague of mine was tasked with trying the upgrade to 5.7 and hit a wall when he encountered the same error after trying to upgrade from 5.5 to 5.7 a few weeks ago. Other priorities in the office led us to postpone upgrading. When 6.0 was released, I was asked to try upgrading myself.
Since Mysql 5.5 was no longer supported, first thing I did was upgrade our DBMS, from MariaDB 5.5.60 to 10.3. Next I upgraded PHP from 5.4 to 7.2, and then I upgraded Testrail itself.
I got the error about the Services class being missing just as my colleague did. At this point, I figured it might be because we were using MariaDB rather than straight MySQL, so I was assuming that i would have to start over and try uninstalling MariaDB and switching to MySQL 5.7, which I wasn’t looking forward to.
However, I noticed something when I tried, merely for completeness sake, to fix the IonCube PHP loader extension as well. I updated the “zend_extension” path in our php.ini file to point to 7.2 instead of 5.4 now that we were using the newer PHP version, and I ran the command “php -m” to confirm that Ioncube was correctly being picked up, when I noticed at the top of the output from that command was the following warning…
PHP Warning: PHP Startup: Unable to load dynamic library 'mysql.so' (tried: /usr/lib64/php/modules/mysql.so (/usr/lib64/php/modules/mysql.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/mysql.so.so (/usr/lib64/php/modules/mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
I wondered if that meant that somehow while upgrading PHP I forgot to also upgrade the php-mysql plugin. Running
rpm -qa | grep php, I saw all the php RPMs I had were correctly at version 7.2, but I noticed there was no “php-mysql” RPM at all in the list. There was however a “php-mysqlnd” instead. A quick Google search showed that php-mysqlnd was indeed a replacement for php-mysql. That was also confirmed when I tried running
yum install php-mysql and it said
Package php-mysql-5.4.16-46.el7.x86_64 is obsoleted by php-mysqlnd-7.2.20-1.el7.remi.x86_64 which is already installed. Nothing to do. I looked in the path where the PHP plugin modules are stored (the warning lists it,
/usr/lib64/php/modules/ in our case) and sure enough, there was no mysql.so file in there, but there was a mysqlnd.so file! Maybe we just needed to tell PHP to use that instead?
Edited php.ini again and looked for mysql.so in it. Found “extension=mysql.so”, so I just changed it to “extension=mysqlnd.so”, restarted apache and it worked! Opening Testrail showed a message saying we were now on version 6.0 and needed to perform a database update with a button to execute it and message clearly and intimidatingly asking me to confirm in writing that I took a DB backup before I can run it.
Hope this helps (if you or anyone else still needs it).