• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Mysql doesn't work after upgrade pfsense from 2.6 to 2.7

Scheduled Pinned Locked Moved General pfSense Questions
14 Posts 5 Posters 1.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V
    vahidmoghadam
    last edited by Aug 10, 2023, 6:15 PM

    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

    S 1 Reply Last reply Aug 10, 2023, 8:06 PM Reply Quote 0
    • S
      SteveITS Galactic Empire @vahidmoghadam
      last edited by Aug 10, 2023, 8:06 PM

      @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.

      Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
      When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
      Upvote 👍 helpful posts!

      V 1 Reply Last reply Aug 10, 2023, 8:17 PM Reply Quote 1
      • V
        vahidmoghadam @SteveITS
        last edited by Aug 10, 2023, 8:17 PM

        @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

        S 1 Reply Last reply Aug 10, 2023, 8:25 PM Reply Quote 0
        • S
          SteveITS Galactic Empire @vahidmoghadam
          last edited by Aug 10, 2023, 8:25 PM

          @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.

          Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
          When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
          Upvote 👍 helpful posts!

          V 1 Reply Last reply Aug 11, 2023, 9:29 AM Reply Quote 0
          • S
            stephenw10 Netgate Administrator
            last edited by Aug 10, 2023, 9:44 PM

            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?

            1 Reply Last reply Reply Quote 0
            • S
              stephenw10 Netgate Administrator
              last edited by Aug 10, 2023, 9:48 PM

              Ah, it's in the php82-mysqli-8.2.6.pkg
              Make sure you have that installed

              1 Reply Last reply Reply Quote 0
              • V
                vahidmoghadam @SteveITS
                last edited by Aug 11, 2023, 9:29 AM

                @SteveITS @stephenw10

                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)

                1 Reply Last reply Reply Quote 0
                • S
                  stephenw10 Netgate Administrator
                  last edited by Aug 11, 2023, 11:35 AM

                  What exactly are you enabling in Freeradius that triggers this?

                  Did the mysql php pkg get installed correctly the second time you tested?

                  V 1 Reply Last reply Aug 11, 2023, 1:36 PM Reply Quote 0
                  • J jimp moved this topic from Problems Installing or Upgrading pfSense Software on Aug 11, 2023, 12:16 PM
                  • J
                    jimp Rebel Alliance Developer Netgate
                    last edited by Aug 11, 2023, 12:19 PM

                    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.

                    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

                    1 Reply Last reply Reply Quote 1
                    • S
                      stephenw10 Netgate Administrator
                      last edited by Aug 11, 2023, 12:30 PM

                      Yup, feels like there may have been something custom running...

                      1 Reply Last reply Reply Quote 0
                      • V
                        vahidmoghadam
                        last edited by Aug 11, 2023, 1:27 PM

                        MySQL service is available on pfSense 2.6 but in 2.7 It doesn't work correctly

                        G 1 Reply Last reply Aug 11, 2023, 1:49 PM Reply Quote 0
                        • V
                          vahidmoghadam @stephenw10
                          last edited by Aug 11, 2023, 1:36 PM

                          @stephenw10

                          I enabled SQL Support in FreeRADIUS to connect a MySQL authorization database

                          1 Reply Last reply Reply Quote 0
                          • G
                            Gertjan @vahidmoghadam
                            last edited by Aug 11, 2023, 1:49 PM

                            @vahidmoghadam

                            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 !?

                            I advise you to read several threads found here (just click) as they all have the same question : how to install mysql server on pfsense and nearly always the same answer : please don't.

                            No "help me" PM's please. Use the forum, the community will thank you.
                            Edit : and where are the logs ??

                            1 Reply Last reply Reply Quote 0
                            • S
                              stephenw10 Netgate Administrator
                              last edited by Aug 11, 2023, 2:55 PM

                              Are you able to show the MySQL service in 2.6? It doesn't exist AFAIK. This could also just be terminology confusion.

                              1 Reply Last reply Reply Quote 0
                              1 out of 14
                              • First post
                                1/14
                                Last post
                              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                This community forum collects and processes your personal information.
                                consent.not_received