Control Web Panel
WebPanel => How to => Topic started by: Administrator on June 29, 2014, 07:55:00 AM
-
how to change my current MySQL root password
Go to phpMyAdmin --> Users Tab
- Click on Edit Privileges for root user
- go to Change password section --> Generate a New Password and click on the Go button.
Now you need to set this new password in the configuration files.
You can use this command from shell:
nano /root/.my.cnf
and edit also this file
nano /usr/local/cwpsrv/htdocs/admin/include/db_conn.php
To check the password you the instructions bellow.
You can use this command from shell:
grep password /root/.my.cnf
or this one
grep db_pass /usr/local/cwpsrv/htdocs/admin/include/db_conn.php
-
to Reset MySQL Root Password also can do via SSH:
# sh /usr/local/cwpsrv/htdocs/resources/scripts/mysql_pwd_reset
-
to Reset MySQL Root Password also can do via SSH:
# sh /usr/local/cwpsrv/htdocs/resources/scripts/mysql_pwd_reset
Warning: [obfuscated](): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf
Warning: [obfuscated]() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Could not connect:
mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES)
-
I reset my mysql password and set it in the config files and it's still not letting me in CentOS WebPanel...
Warning: [obfuscated](): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Trying to start mysql server, please wait!
Try to restart CentOS Web Panel with command: service cwpsrv restart
**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf
Warning: [obfuscated]() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Could not connect:
SSH command >
root@windburn home]# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")
[root@windburn home]#
-
cat /root/.my.cnf
-
This script is still broken, but you can run it after manually changing the password like this:
https://stackoverflow.com/a/35748657/1940276
-
Track adjustment
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php