Mysql doesn't work after upgrade pfsense from 2.6 to 2.7
-
Hi,
I was using pfSense 2.6 along with freeRadius with a MySQL database authentication and I had no problems. Everything was normal.
When I tried to update to pfSense 2.7, all the packages were successfully downloaded and installed, and I did not receive any error messages while receiving and installing the packages.
Now the freeRadius service does not start because the MySQL service is not started. Also, the MySQL service does not run and I get the following error message when I try to start it:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Also, I have Crash Report on the pfSense web interface:
Crash report begins. Anonymous machine information: amd64 14.0-CURRENT FreeBSD 14.0-CURRENT #1 RELENG_2_7_0-n255866-686c8d3c1f0: Wed Jun 28 04:21:19 UTC 2023 root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-2_7_0-main/obj/amd64/LwYAddCr/var/jenkins/workspace/pfSense-CE-snapshots-2_7_0-main/sources/FreeBSD-src-REL Crash report details: PHP Errors: [10-Aug-2023 15:12:07 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli.so' (tried: /usr/local/lib/php/20220829/mysqli.so (Cannot open "/usr/local/lib/php/20220829/mysqli.so"), /usr/local/lib/php/20220829/mysqli.so.so (Cannot open "/usr/local/lib/php/20220829/mysqli.so.so")) in Unknown on line 0
I was really looking for a solution to solve the problem, but all of them were useless. please help me
-
@vahidmoghadam That sounds like it didn't get installed properly? Easiest would be to uninstall and reinstall FreeRADIUS.
Ensure you have clicked save on the settings page at least once (ever) before doing so, or some settings get left out during reinstall/restore.
-
@SteveITS
Thanks for your answer,Are you sure that my problem solve with reinstalling FreeRadius? my MySQL can not be run, Do you think with reinstalling FreeRADIUS MySQL will be repaired?
Thanks
-
@vahidmoghadam I was guessing. Uninstalling and reinstalling should be safe unless you've unchecked the option to "Keep Settings/Data." If that doesn't work then the brute force approach would be to install 2.7 from scratch and then restore your config file from backup.
As a small bonus reinstalling would use the ZFS file system.
-
Hmm mysqli.so doesn't exist in pfSense after installing Freeradius. But it also doesn't exist in 2.6.
Did you install anything custom there? -
Ah, it's in the php82-mysqli-8.2.6.pkg
Make sure you have that installed -
Actually, the source of my problem is related to the MySQL service, It can not be started.
Now I installed a new version and fresh pfSense on another physical machine, then installed the FreeRADIUS, everything was OK and FreeRADIUS started and worked normally, When I enabled the MySQL connection in FreeRADIUS, the FreeRADIUS service stopped because the MySQL service was not running.
and again I get this error when I try to start MySQL even on fresh pfSense.
ERROR 2002 (HY00): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
-
What exactly are you enabling in Freeradius that triggers this?
Did the mysql php pkg get installed correctly the second time you tested?
-
J jimp moved this topic from Problems Installing or Upgrading pfSense Software on
-
There is no "MySQL Service" on pfSense. Even with the PHP MySQL module installed it is only capable of acting as a client to contact a MySQL server on another host.
-
Yup, feels like there may have been something custom running...
-
MySQL service is available on pfSense 2.6 but in 2.7 It doesn't work correctly
-
I enabled SQL Support in FreeRADIUS to connect a MySQL authorization database
-
Running a MySQL server on pfSense ??
Read and sign off the Using Software from FreeBSD.
Be aware : totally not supported, so you have to support it by yourself, as you already did it ones : if you had a MySQL server running on your 2.6.0 then you installed that yourself.
So, do it again !? -
Are you able to show the MySQL service in 2.6? It doesn't exist AFAIK. This could also just be terminology confusion.