• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Resolved 500 Plesk\Exception\Database

i_fiorentino

New Pleskian
Hi to all,
i would solved a big problem on my server about an excessive use of resources about mysql process.
To do this, i would re-start this process using ssh string command:

sudo service mysql restart

Unfortunately, i didn't remember my password to run this command....so, i'm logged into my plesk account and changed my admin password into phpmyadmin section.
Big error!!

After that, i don't manage to have access into my plesk account....i've this error:


Please, i need your help to solve these problem and restart mysql service.
Thanks in advance for any help.

Alessandro
 
I understand that you have changed the MySQL or MariaDB database user "admin" account so that Plesk does not know your new password. Now you would like to reset the MySQL or MariaDB database user "admin" account so that Plesk can login using that "admin" account again. We are not talking about the Plesk admin login, but the database server admin account.

1) Copy the content from cat /etc/psa/.psa.shadow, as this is the password that you need to set for the MySQL "admin" user account.

2) Stop your database server. Depending on the type of server this would for example be
# service mariadb stop
or
# /etc/init.d/mysql stop
or whatever the correct command is for your specific database server.

3) Start your database server manually with the "skip-grant-tables" directive, for example
# mysqld_safe --skip-grant-tables
Again: This command might depend on your database server (e.g. MariaDB, MySQL ...) Use what is right for your server version. There are tons of examples on the Internet for skip-grant-tables. They all work the same, but the command could depend on the database server you are using.

4) Now you can login without providing a root password for the database. Login to your database server
# mysql -uadmin -p
or
# mariadb -uadmin -p
etc.

5) Update the "admin" database user account with the password obtained from /etc/psa/.psa.shadow
> use mysql;
> update user set password=password('<your password taken from /etc/psa/.psa.shadow>') where user="admin";
(Instead of <your passwod ...shadow> insert your passwort, do not insert the < and >, this is only to mark where to insert something.)

6) Stop your database server

7) Start your database server regularly (without skip-grant-tables)

Plesk should now be able to access the database again with the "admin" database user.
 
Back
Top