implement panel option for changing MySQL root password

Started by n8v8r, January 29, 2018, 08:07:23 PM

Previous topic - Next topic

n8v8r

After the CWP installation one might want to change the SQL root password but there is currently no option in the panel. Instead the password has to be changed manually in the DB and then in **Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf


n8v8r

Did you try it? It is generating just a new random password and not providing an option to set one's own, hence no good, still have to change everything manually.

bullten

nano /scripts/mysql_pwd_reset

Find line

QuoteDB_ROOT_PASS=`cat /dev/urandom| tr -dc 'a-zA-Z0-9' | fold -w 12|head -n1`

Replace it

Quoteread -sp 'Password: ' DB_ROOT_PASS

Then run the script again.

n8v8r

awfully nice of you, works like a charm  8)

I am still in favour of CWP implementing it in the gui