• Support
  • Cron MySQL backup not working

Cron backup of MySQL database does not work anymore.

Error:

★start backup[2024-09-19 14:26:56]

(1045, "Access denied for user 'root'@'127.0.0.1' (using password: YES)&quot😉

(1045, "Access denied for user 'root'@'127.0.0.1' (using password: YES)&quot😉

|-Error:Failed to connect to database [localhost: 3306]
|-Message sent successfully.
|-The message notification has been sent.

I have already done the following multiple times:

  • Restart panel
  • Pressed Fix button
  • Set a new MySQL Root password and checked access via phpmyadmin etc.

Initial FIX NOT WORKING:
Delete cron and add again. but same error.

    Hi, can you give us your aapanel information? The server makes a snapshot backup first, if possible, please send it to kern@aapanel.com.
    It is recommended to fill in the following
    Post link:
    SSH IP address, account password and port:
    aapanel login link address and account password:
    Detailed problem description:

    No post link will not be able to know which user's information is, and the problem will not be processed

    aaP_crazykiddodk

    This is not possible as I have clients secure information and live sites running.
    Where is the database backup information coming from? is it stored in DB?

      but there is nothing there, all priv are Y and host set to localhost

      Again everything works, sites, phpmyadmin even DB backup from Database list
      only Cron that does not

        It seems like that worked, hmmm but how come since I have not changed anything with root user.

          for root user yes, but there are a few others that are open to remote

          Hello, I suggest you provide the error information.
          Please check if the prompted user and host exist?

          idflorin

            aaPanel_Kern its root
            https://prnt.sc/82uSWSZB905x

            `★start backup[2024-09-23 20:30:43]

            (1045, "Access denied for user 'root'@'127.0.0.1' (using password: YES)&quot😉

            (1045, "Access denied for user 'root'@'127.0.0.1' (using password: YES)&quot😉

            |-Error:Failed to connect to database [localhost: 3306]

            ★start backup[2024-09-23 20:30:43]

            (1045, "Access denied for user 'root'@'127.0.0.1' (using password: YES)&quot😉

            (1045, "Access denied for user 'root'@'127.0.0.1' (using password: YES)&quot😉

            |-Error:Failed to connect to database [localhost: 3306]

            ★start backup[2024-09-23 20:30:43]

            (1045, "Access denied for user 'root'@'127.0.0.1' (using password: YES)&quot😉

            (1045, "Access denied for user 'root'@'127.0.0.1' (using password: YES)&quot😉

            |-Error:Failed to connect to database [localhost: 3306]
            Traceback (most recent call last):
            File "/www/server/panel/class_v2/panel_backup_v2.py", line 1856, in send_notification
            push_res = pp.push_message_immediately(channel_data)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/www/server/panel/class/panelPush.py", line 394, in push_message_immediately
            ret = msg_obj.push_data(msg)
            ^^^^^^^^^^^^^^^^^^^^^^
            File "/www/server/panel/class/msg/tg_msg.py", line 228, in push_data
            return self.send_msg(data['msg'])

            KeyError: 'msg'
            
            ==========================================================================================
            |-Error:Message notification sending failed.
            ----------------------------------------------------------------------------
            ★[2024-09-23 20:30:43] Successful
            ----------------------------------------------------------------------------`
            
            
            System: Ubuntu 22.04.5 LTS x86_64(Py3.12.3)
            Up Time: 4 Day(s) aapanel 7.0.9

              Hi, can you give us your aapanel information? The server makes a snapshot backup first, if possible, please send it to kern@aapanel.com.
              It is recommended to fill in the following
              Post link:
              SSH IP address, account password and port:
              aapanel login link address and account password:
              Detailed problem description:

              No post link will not be able to know which user's information is, and the problem will not be processed

              idflorin

                4 months later

                I have the exact same problem.
                The cron job (Task name: Backup database) fails to backup the databases with the error (1045, "Access denied for user 'root'@'127.0.0.1' (using password: YES)&quot😉

                The database root password is correct and at the same time I can backup each database individually through /database/mysql by clicking the "Backup" button at the Database Backup Details.

                My aaPanel version is 7.0.15 recently updated from 7.0.13 and the error is the same for both of them!
                MySql version is 9.0.1