Plesk: MySQL login as Admin User

A situation came up with a new Plesk server. I needed to login to MySQL with admin/root access. I had no idea what the password was. Luckily there’s a trick to logging in as the admin user. Login remotely to your server using SSH and do the following:

mysql -u admin -p `cat /etc/psa/.psa.shadow` Your shell prompt should now look like this:

mysql>

Run … Continue reading Plesk: MySQL login as Admin User

Reset the MySQL root password.

A little while ago I inherited an old Plesk server at my workplace. Of course, nobody knew the root password. So, I had to call the hosting company who housed our dedicated server and get the root password for the box. Unfortunately, nobody knew what the MySQL root password was either. Luckily I discovered there is a way to reset this password.

Following are the steps to reset the Mysql password in Plesk:

1) Login to the Server and load MySQL with the ‘skip-grant-tables’ in /etc/my.cnf like below. Your file will most likely look different.
[mysqld]
default-character-set=latin1
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
set-variable=max_connections=500
skip-grant-tables

2) Log on … Continue reading Reset the MySQL root password.