Author Topic: how to check my current MySQL root password  (Read 76538 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
how to check my current MySQL root password
« 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
« Last Edit: January 26, 2015, 11:59:32 PM by Administrator »
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: how to check my current MySQL root password
« Reply #1 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

Offline
*
Re: how to check my current MySQL root password
« Reply #2 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)

Offline
*
Re: how to check my current MySQL root password
« Reply #3 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]#
« Last Edit: March 26, 2017, 09:13:41 PM by DarkSorrow »

Offline
***
Re: how to check my current MySQL root password
« Reply #4 on: July 26, 2017, 05:10:49 AM »
Code: [Select]
cat /root/.my.cnf
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
*
Re: how to check my current MySQL root password
« Reply #5 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

Offline
*
Re: how to check my current MySQL root password
« Reply #6 on: December 30, 2020, 03:06:08 PM »
Track adjustment
Code: [Select]
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
كن في الحياه كعابر سبيل واترك وراءك كل اثر جميل فما نحن في الدنيا الا ضيوف وما على الضيوف الا الرحيل