Question
How to find cyberpanel mysql root password?
Resolution
Cyberpanel is a popular web hosting panel that utilizes Openlitespeed as a web server.
Root password for Cyberpanel MySQL is stored under the following file:
/etc/cyberpanel/mysqlPassword
You may find the password with the following:
cat /etc/cyberpanel/mysqlPassword
Now, if you want to avoid finding and typing the root password every time you run MySQL command, you may do the following
Login to your ssh using the root username.
Make sure you are in the root directory for the user root # cd Now create a file called .my.cnf with the following content # nano .my.cnf File Content [client] user=root password="fydEAhdoMu9WKW"
Now save the file and try commands like the following:
mysqladmin proc stat
It shall work without asking for a password.
NB. Cyberpanel 2.1.2, they are populating .my.cnf automatically. Hence, you can also find your root password from this file using the following while logged in as root:
cat /root/.my.cnf