HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

Cannot connect to MySQL via SSL

I am using PHP 7.2.34 with the PDO_mysql extension installed, HelpSpot 4.9.5. When I add to the config.php the two defines for cMYSQL_CLIENT_SSL and cMYSQL_INI_PATH (as explained in the manual) and enable the debug, I get the following exception:

Undefined class constant ‘MYSQL_ATTR_READ_DEFAULT_FILE’ #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(44): require() #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Config/FileLoader.php(246): Illuminate\Filesystem\Filesystem->getRequire(’/var/www/html/c…’) #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Config/FileLoader.php(77): Illuminate\Config\FileLoader->getRequire(’/var/www/html/c…’) #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Config/Repository.php(152): Illuminate\Config\FileLoader->load(‘production’, ‘database’, NULL) #4

Looking around I’ve got the idea the the current PHP MySQL driver implementation (mysqlnd) does not support reading the my.cfn configuration file (see here). If I remove the cMYSQL_INI_PATH, HelpSpot will try to connect to the db without SSL.

Is there something wrong with my PHP setup? or is there another way to specify the SSL options without reading the my.cnf file?