• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Updating mariadb password

Dukemaster

Regular Pleskian
Hi friends of Plesk,
I never used a special password for mysql over 13 years using Plesk.
2 months ago I set a passwort for MariaDB 10.2 for the first time. Now I'm not able to login to do "mysql_upgrade".
I'm able to login psa database by
Code:
~# plesk db
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 1049
Server version: 10.2.18-MariaDB-1:10.2.18+maria~bionic mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [psa]>
But not with
Code:
root@server:~# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
The old passwort I have set doesn't work any longer. Perhaps it's expired or I use the wrong one.

Could you please help me to update/reset a new password for MariaDB 10.2 (Ubuntu18.04 + PLESK 17.8.11)?

Lots of greets
 
Hi friends of Plesk,
I never used a special password for mysql over 13 years using Plesk.
2 months ago I set a passwort for MariaDB 10.2 for the first time. Now I'm not able to login to do "mysql_upgrade".
I'm able to login psa database by
Code:
~# plesk db
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 1049
Server version: 10.2.18-MariaDB-1:10.2.18+maria~bionic mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [psa]>
But not with
Code:
root@server:~# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
The old passwort I have set doesn't work any longer. Perhaps it's expired or I use the wrong one.

Could you please help me to update/reset a new password for MariaDB 10.2 (Ubuntu18.04 + PLESK 17.8.11)?

Lots of greets

Hello @Dukemaster

you can try to use :

Code:
MYSQL_PWD=$(cat /etc/psa/.psa.shadow) mysql -uadmin
 
Thank you very much @virtubox. It worked fine. :) Thumbs up.
But I've already the problem that mysql_upgrade fails? Perhaps you know why?
Code:
root@server:~# mysql_upgrade
Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
FATAL ERROR: Upgrade failed
Greets
 
Thanks god for looking again in the PLESK SUPPORT ARTICLE (Ubuntu18.04) which I used to upgrade MariaDB 10.1 to 10.2 few weeks ago.
This article was updated exactly with the informations I needed now.
Magic quotes which leaded to success:
Code:
Upgrade MySQL databases:

# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin

Restart mysql service:

# service mariadb restart

Execute this command to update the package version inside Plesk:

# plesk sbin packagemng -sdf

Thanks for your time helping me and watching this thread. Next job is to change the root database password...
Greets
 
Back
Top