How to get the MySQL root password details – cPanel

The MySQL server saves its root password in a file “.my.cnf” under the root directory. You can find out its from the file as I mentioned.

Example:

root@server [~]# cat /root/.my.cnf
[client]
password=")%:pV(Yo"
user=root

If you were loged in to the server as root user, then you do not need the password to access the MySQL. You can simply access the Database by executing the command “mysql”.

Example:

root@server [~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 275
Server version: 5.5.35-33.0 Percona Server (GPL), Release rel33.0, Revision 611
Copyright (c) 2009-2013 Percona LLC and/or its affiliates
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
mysql>

  • 0 Khách hàng đánh giá tốt về chủ đề này
Chủ đề này có giúp được bạn ?
Bài viết liên quan

Powered by WHMCompleteSolution

Copyright © 2019 Công ty TNHH KDATA. All Rights Reserved.