Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-26177

ezcache script fails if you have a external mysql server

    XMLWordPrintable

Details

    Description

      If you have an external MySQL Server and tries to clear legacy cache with the ezcache script in PROD environment, it will fail.

      php ezpublish/console --env=prod ezpublish:legacy:script bin/php/ezcache.php --clear-all --expiry=now --purge --siteaccess=ezdemo_site_admin

      [RuntimeException]
      Database error

      [Doctrine\DBAL\Exception\ConnectionException]
      An exception occured in driver: SQLSTATE [HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

      [Doctrine\DBAL\Driver\PDOException]
      SQLSTATE [HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

      [PDOException]
      SQLSTATE [HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

      It seems that the ezcache is trying to connect to the localhost instead going to the external server as it should. This only happens in PROD.

      This seems to be the same error described in EZP-23268.

      Attachments

        Activity

          People

            Unassigned Unassigned
            eduardo.fernandes-obsolete@ez.no Eduardo Fernandes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: