Author Topic: I have a problem when logging into the server panel  (Read 1510 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
I have a problem when logging into the server panel
« on: October 12, 2022, 05:16:02 PM »
Hi

I have a problem when logging into the server panel



Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (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 Control Web Panel with command: sh /scripts/restart_cwpsrv

**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf
You can reset the MySQL root password fast with this command: /scripts/mysql_pwd_reset -q

Warning: mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Could not connect:


Offline
*
Re: I have a problem when logging into the server panel
« Reply #1 on: October 16, 2022, 11:33:20 PM »
this is what I'd do to reset MySQL password
1.) mysql --version
2.) sudo systemctl stop mysql(if root sudo is not needed)
3.) sudo mysqld_safe --skip-grant-tables &
4.) mysql -u root
5.) ALTER USER 'root'@'localhost' IDENTIFIED BY 'MY_NEW_PASSWORD';
6.) FLUSH PRIVILEGES;
7.) UPDATE mysql.user SET authentication_string = PASSWORD('MY_NEW_PASSWORD') WHERE User = 'root' AND Host = 'localhost';
8.) FLUSH PRIVILEGES;
9.) SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MY_NEW_PASSWORD');
10.) FLUSH PRIVILEGES;
if all goes well you should see this: Query OK, 0 rows affected (0.00 sec)
then either restart mysql or reboot server
for more details search "reset mysql password"  8)
Owner
440Music Entertainment Co
OnLine Broadcasting since March 6, 1999
www.440music.com