• Uncategorized
  • 0

How to access MySQL without knowing its password in a Plesk server

Here I am explaining how you can access MySQL without knowing its password in a Plesk server.

# mysql -uadmin -p`cat /etc/psa/.psa.shadow`

The above command is used to access MySQL without prompting for a password.

In case, if you need to take backup of a database or you need to restore a database in a plesk server and you don’t know the MySQL root password, then you can follow the steps below:

 
# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` database_name > database.sql

# mysql -uadmin -p`cat /etc/psa/.psa.shadow` database_name < database.sql

That’s it!!

Related Links:
Reset mysql root password from command line
How to allow mysql client to access remote mysql databases

Arunlal Ashok

Sr. Linux Server Administrator. I'm managing Linux servers since 2012. I started this blog to share and discuss my ideas. Check My Profile in uPwork (oDesk) and create a job, if you need any administration help. Thanks!!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *