New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

root password change

Started by anandmys, April 17, 2025, 06:31:16 AM

Previous topic - Next topic

anandmys

I tried following https://wiki.centos-webpanel.com/how-to-reset-mysql-root-password

Quote
[root@hosting ~]# sh /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): abcxyzavcbdFrsg
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('abcxyzavcbdFrsg'),Authentication_string=PASSWORD('abcxyzavcbdFrsg') 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: abcxyzavcbdFrsg

Remember to store this password safely!

/scripts/mysql_pwd_reset: line 26: [: -eq: unary operator expected
Redirecting to /bin/systemctl start mariadb.service


And now CWP panel is not working

overseer

Looks like you have uncovered a bug in the MySQL PW reset script. You may need to manually change the PW via the CLI and then make sure the new PW is in both of these files:
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
/root/.my.cnf

https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password

anandmys

Quote from: overseer on April 17, 2025, 10:53:42 AM
Looks like you have uncovered a bug in the MySQL PW reset script. You may need to manually change the PW via the CLI and then make sure the new PW is in both of these files:
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
/root/.my.cnf

https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password

Thank you