-
Notifications
You must be signed in to change notification settings - Fork 857
Description
Hello, I have been using this script for a bunch of years now and suddenly, it seems that after upgrading to MariaDB 11.4.5. the CLI command stopped functioning and now returns this error:
db: SQLSTATE[HY000] [1045] Access denied for user '[user]'@'[IP address]' (using password: YES)
I tried PHP cli versions 7.4.33 and 8.1.31 with no difference.
I made sure the password is correct and connected successfully with the following methods:
mysql -u user -p (with a deprecation message but still worked)
mariadb -u user -p
And I can see the database I am trying to search and replace within, using the above credentials then executing:
SHOW DATABASES;
I've also checked in both php versions and both mysqli and PDO are available so these variables are true when called in db_setup():
$mysqli_available = class_exists( 'mysqli' );
$pdo_available = class_exists( 'PDO' );
The web version worked fine but I need to make the CLI command work for automation purposes:
php srdb.cli.php -h host.domain.ext -n "db_name" -u "db_user" -p "password" -s "search_string" -r "replace_string"
I've also tried using localhost and 127.0.0.1 with no better luck.
Is there something I am missing?