I know this script worked perfectly before.
/scripts/mysql_pwd_reset
I've recently done several installations of CWP 8 (for various tests), and after installing CWP 8 without restarting, if we run the password reset script, it works. However, if we restart CWP 8 after installing it, it no longer works, and from what I can see, we lose access to CWP administration (and therefore, the MariaDB service is inoperative).
I've tested it with both the stock and upgraded versions of MariaDB.
I understand that, over time and with updates, the script has become "outdated."
This is the code that appears when we run it:
[root@server ~]# /scripts/mysql_pwd_reset
Enter the new root password (at least 8 chars).
Or leave it empty if you would like to generate it.
Or press CTRL+C to abort and do not touch it
Enter MySQL root password (NO special characters): testpass9876
Shutting down any mysql processes...
/scripts/mysql_pwd_reset: line 14: [: -eq: unary operator expected
Redirecting to /bin/systemctl stop mariadb.service
/scripts/mysql_pwd_reset: line 26: [: -eq: unary operator expected
Redirecting to /bin/systemctl start mariadb.service
Resetting password... hold on
--------------
UPDATE mysql.user SET Password=PASSWORD('testpass9876'),Authentication_string=PASSWORD('testpass9876') WHERE user='root'
--------------
ERROR 1348 (HY000) at line 1: Column 'Password' is not updatable
Cleaning up...
/scripts/mysql_pwd_reset: line 14: [: -eq: unary operator expected
Redirecting to /bin/systemctl stop mariadb.service
Password reset has been completed
New MySQL root password: testpass9876
Remember to store this password safely!
/scripts/mysql_pwd_reset: line 26: [: -eq: unary operator expected
Redirecting to /bin/systemctl start mariadb.service
[root@server ~]#