Plesk Maria DB管理员密码从5.5升级到10.2后更改

问题描述 投票:0回答:1

按照本教程,我已经将MariaDB从5.5升级到10.2(在CentOS 7.7上:https://support.plesk.com/hc/en-us/articles/213403429

MariaDB 10.2正在运行。用户/网站可以连接到他们的数据库。但是我无法再与管理员联系。

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin --all-databases --routines --triggers > /tmp/all-databases-new.sql

Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
FATAL ERROR: Upgrade failed

我试图为管理员设置新密码,但是...

systemctl stop mariadb
[root@host ~]# mysqld_safe --skip-grant-tables --skip-networking &
[1] 76597
[root@host ~]# 200317 08:23:11 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
200317 08:23:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
[1]+  Done                    mysqld_safe --skip-grant-tables --skip-networking
[root@host ~]# mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

由于Plesk不再能够访问psa数据库,因此不再能够访问Plesk GUI。现在该怎么办?

非常感谢!

plesk
1个回答
0
投票

“ mysqld_safe --skip-grant-tables --skip-networking&”失败的原因是,Mariadb无法写入pid文件。 Mariadb尝试将其写入/ var / run / mariadb,但该目录不存在。您可以创建目录或更改配置,以便Mariadb为pi文件使用另一个目录。之后,可以执行“ mysqld_safe --skip-grant-tables --skip-networking&”并为数据库用户“ admin”设置新密码。

出于所有内部目的,Plesk从/etc/psa/.psa.shadow获取数据库密码。因此,我把它放在纯文本中,它可以工作,但是纯文本当然不好。有人知道如何再次将密码存储为哈希吗?我认为它存储为AES128哈希,需要正确的秘密吗?

© www.soinside.com 2019 - 2024. All rights reserved.