Control Web Panel

WebPanel => How to => Topic started by: Administrator on June 29, 2014, 07:55:00 AM

Title: how to check my current MySQL root password
Post 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:
Code: [Select]
nano /root/.my.cnf
and edit also this file
Code: [Select]
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:
Code: [Select]
grep password /root/.my.cnf
or this one
Code: [Select]
grep db_pass /usr/local/cwpsrv/htdocs/admin/include/db_conn.php
Title: Re: how to check my current MySQL root password
Post by: Bestariweb Hosting on May 08, 2015, 03:34:45 PM
to Reset MySQL Root Password also can do via SSH:

Code: [Select]
# sh /usr/local/cwpsrv/htdocs/resources/scripts/mysql_pwd_reset
Title: Re: how to check my current MySQL root password
Post by: hnomkeng on March 03, 2017, 01:51:37 AM
to Reset MySQL Root Password also can do via SSH:

Code: [Select]
# 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)
Title: Re: how to check my current MySQL root password
Post by: DarkSorrow on March 26, 2017, 09:10:48 PM
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]#
Title: Re: how to check my current MySQL root password
Post by: darkness on July 26, 2017, 05:10:49 AM
Code: [Select]
cat /root/.my.cnf
Title: Re: how to check my current MySQL root password
Post by: rothkj1022 on March 13, 2019, 03:02:24 PM
This script is still broken, but you can run it after manually changing the password like this:
https://stackoverflow.com/a/35748657/1940276