Preloader
Web development
  • Estimated reading time: 1 Minute

How to login as root (admin) user in the MySQL CLI with Plesk

How to login as root (admin) user in the MySQL CLI with Plesk

Someone that has worked with the MySQL CLI knows how easy it is to access all databases on the server with the following command:

mysql -u root -p password

However, trying to do the same on plesk will fail basically because you will probably don't know what's the password to access MySQL. In this article we'll show you how to login as root/admin.

Logging in as admin in MySQL with Plesk

To login as admin (or root) to MySQL through the CLI in a server with Plesk you can use the following command:

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin

What we are basically doing is to access as admin, the user that has all privileges to execute any query that you need with the encrypted password stored in the .psa.shadow file of Plesk. For more information about how to access to the MySQL CLI in Plesk, check the official article of Plesk here.

Happy coding !

Share:
Carlos Delgado

Carlos Delgado

Senior Software Engineer at Software Medico. Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.

Related articles
WordPress vs Custom Website: Which is Better for Your Business?
23 Apr, 2026
  • Estimated reading time: 5 Minutes
Guidelines To Follow In Test Case Writing
4 Mar, 2026
  • Estimated reading time: 4 Minutes
How to Build a Secure Authentication System in a Web Application
27 Feb, 2026
  • Estimated reading time: 5 Minutes
The Ultimate Guide to Finding a Skilled Mobile App Developer Dubai
3 Feb, 2026
  • Estimated reading time: 5 Minutes
Weekly trending
Teachersgram Apparel: Perfect Gifts for Educators
11 Jun, 2026
  • Estimated reading time: 5 Minutes
Upgrade Your Wardrobe with Stylish Nerdywave Mesh Jerseys
11 Jun, 2026
  • Estimated reading time: 6 Minutes
7 Top International IPTV Services Worth Trying in 2026
11 Jun, 2026
  • Estimated reading time: 11 Minutes
Top 2026 Guide to Multi Face Swap Video Creation for Beginners
11 Jun, 2026
  • Estimated reading time: 7 Minutes
Our Sponsors

Our blog is proudly supported by industry-leading sponsors.