Clean-up job Failed - PDOException: "could not find driver"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • smartinsar
    Member
    • Dec 2021
    • 33

    Clean-up job Failed - PDOException: "could not find driver"

    Hello,
    I'm just found that all Cleanup Jobs running last 3 month returns Failed status.
    Error log returns this error:

    ERROR: Uncaught Exception PDOException: "could not find driver" at /var/www/espocrm/data/espocrm/application/Espo/ORM/PDO/MysqlPDOFactory.php line 73 {"exception":"[object] (PDOException(code: 0): could not find driver at /var/www/espocrm/data/espocrm/application/Espo/ORM/PDO/MysqlPDOFactory.php:73)"}
    Can you help me to solve this issue?


    My EspoCRM instance is running on docker containers.
    Administration System Requirements
    PHP Version 8.1.20
    MySQL Version 8.0.30
    pdo_mysql On Success
    I've check this error on StackOverflow, the only solution they offer to install module pdo_mysql to PHP. ​​​

    Thank you

    Last edited by smartinsar; 07-17-2023, 05:17 AM.
  • esforim
    Active Community Member
    • Jan 2020
    • 2204

    #2
    Your server/IP is currently shown. If this is OK that fine, but if it isn't I recommend removing it

    Sorry I can't help, look like your PDO_Mysql already installed. Perhaps reinstalling it might help or might not do anything. Switching PHP version and trying again may also help.

    Also what is your EspoCRM version

    Comment

    • abidoss
      Senior Member
      • Mar 2023
      • 228

      #3
      Good morning
      Check as well version of php installed on your server and try to start the correct version​

      Comment

      • smartinsar
        Member
        • Dec 2021
        • 33

        #4
        Originally posted by espcrm
        Your server/IP is currently shown. If this is OK that fine, but if it isn't I recommend removing it

        Sorry I can't help, look like your PDO_Mysql already installed. Perhaps reinstalling it might help or might not do anything. Switching PHP version and trying again may also help.

        Also what is your EspoCRM version
        Thank you, ip removed.

        EspoCRM version 7.5.5


        Good morning
        Check as well version of php installed on your server and try to start the correct version​​
        PHP version on server is the same
        Code:
        php -v
        PHP 8.1.2-1ubuntu2.13 (cli) (built: Jun 28 2023 14:01:49) (NTS)

        Comment

        • lazovic
          Super Moderator
          • Jan 2022
          • 809

          #5
          Hi smartinsar,

          Could you send server error logs and MySQL error logs?

          Comment

          • smartinsar
            Member
            • Dec 2021
            • 33

            #6
            The issue solved.
            I've installed php8.1-mysql to the server.
            Code:
            sudo apt install php8.1-mysql
            Then get internal IP address from docker container espocrm-mysql
            Code:
            docker container ls
            docker inspect 011aa6fbd9ec
            Add IP to the hosts in /etc/hosts
            Code:
            13.0.03.4 espocrm-mysql
            after that run Clean Up manually
            Code:
            php command.php run-job Cleanup
            Job 'Cleanup' has been executed.



            Comment

            Working...