Cloning/Staging doesn't copy the database

I was trying the cloning feature for my WordPress, everything went perfect and cloning was successful. However, the database is not getting cloned and opening my staging site prompts me to the Wordpress install.php
I tried copying the database manually but I always get the error “the dynamic response size is over the limit” despite having my dynamic body response limit to max (2047M).
Any help will be appreciated

Please use this guide to troubleshoot this problem because database should be copied unless there is something wrong with the server → Troubleshooting CyberPanel - 14 - Logging & Troubleshooting - CyberPanel Community

do share CP logs with us.

@jaspix I used some of the trouble shooting tips and found my issue(s). It appears my wp-cli was having trouble connecting to the database.

In my case, /etc/mysql/my.conf had the bind-address set to my public IP, I changed this to 127.0.0.1 and commented the ‘skip-name-resolve’. I tried the script again it it worked fine.

(In previous attempts to fix, I installed php7.4-mysql as it seems wp-cli runs a different php than litespeed, so not sure if that step was required…)