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

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

Get CWPpro ›

how to check my current MySQL root password

Started by Administrator, June 29, 2014, 07:55:00 AM

Previous topic - Next topic

Administrator

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

Bestariweb Hosting

to Reset MySQL Root Password also can do via SSH:

# sh /usr/local/cwpsrv/htdocs/resources/scripts/mysql_pwd_reset


hnomkeng

Quote from: Bestariweb Hosting on May 08, 2015, 03:34:45 PM
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)

DarkSorrow

#3
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]#

darkness

UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

rothkj1022

This script is still broken, but you can run it after manually changing the password like this:
https://stackoverflow.com/a/35748657/1940276

ahmedalnagar

Track adjustment
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
كن في الحياه كعابر سبيل واترك وراءك كل اثر جميل فما نحن في الدنيا الا ضيوف وما على الضيوف الا الرحيل