interconnectit / Search-Replace-DB

This script was made to aid the process of migrating PHP and MySQL based websites. Works with most common CMSes.
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
GNU General Public License v3.0
3.99k stars 850 forks source link

db: SQLSTATE[HY000] [2002] Connection refused #379

Open cedriccharles4 opened 2 years ago

cedriccharles4 commented 2 years ago

Hello there :)

First of all, thank you for your great script! I'm trying to use the CLI version for the first time but can't make it work… I'm using MAMP Pro on a Macbook. Here is the configuration of the ports on MAMP Pro: image

Here is the command I used: /Applications/MAMP/bin/php/php7.4.2/bin/php ./srdb.cli.php -h 127.0.0.1 -n mydbname -u root -proot --port 3306 -c utf8mb4 -s "olddomain" -r "newdomain" With this command, I got this: db: SQLSTATE[HY000] [2002] Connection refused And we're done!

Could you pease tell me what's wrong?

Kind regards, Cedric