First off…

I need to start off by explaining the purpose, in brief, of a control panel like VestaCP. VestaCP’s purpose, in my opinion, is to provide a self-contained management interface for a web server designed to host multiple accounts and sites. So, as it is, VestaCP handles all of the heavy lifting. Now this ability to host multiple accounts, sites, and services comes with its limitations to the owner.

Some of the “limitations”

  • “Lack” of “Root” control
  • Everything is automated
  • The misleading appearance of simplicity

Overall, VestaCP is awesome! It is great for web hosts and non web hosts alike. It is a turn key solution to web server management. Now, with that said, we are focusing on one the limitations above in this article. Getting root control over your MySQL service. For security reasons, it is always smart to only use this access if absolutely necessary.

The term “root” in administration is pretty much god or “super user” privileges. Use them sparingly and make sure you have a very strong password.


I am expecting you to have some knowledge of how to navigate via terminal on your particular distribution of linux. I am putting this guide together using an Ubuntu 14.04 LTS server. Some familiarity with the mysql client and nano or vim (or whatever editor you prefer).

Checkout the VestaCP MySQL Config

Open up mysql.conf. You may need to open it using sudo. The conf directory is read/write protected.

sudo nano /usr/local/vesta/conf/mysql.conf


Changing the MySQL Root Password

This another must know. If you are willing to find the information you must be willing to secure it and change it when needed. So, I’ve included that below. Our initial root password is ‘taco’. We will be changing it to ‘twotacos’. If you like tacos, two tacos is better… lol.

  1. Change the root password using ‘mysqladmin’. Note: No space between ‘-p’ and the current password.
    mysqladmin -u root -ptaco password 'twotacos'
  2. Update mysql.conf for VestaCP
    sudo nano /usr/local/vesta/mysql.conf
  3. Update .my.cnf in the /root directory
    sudo nano /root/.my.cnf
  4. Test it! Create a DB in your VestaCP and also login local via terminal and run some sql to show tables.

That wraps up this guide. Thanks for reading!