Reset maria DB password on Plesk

Is it mysql or maria?

# service mysqld status
Redirecting to /bin/systemctl status  mysqld.service
mysqld.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

]# systemctl status mariadb.service
mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
   Active: active (running) since Mon 2015-10-05 21:03:57 EST; 3min 30s ago
  Process: 26953 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
  Process: 26922 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
 Main PID: 26952 (mysqld_safe)
   CGroup: /system.slice/mariadb.service
           ├─26952 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
           └─27120 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock

Oct 05 21:03:55 domain.com mysqld_safe[26952]: 151005 21:03:55 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Oct 05 21:03:55 domain.com mysqld_safe[26952]: 151005 21:03:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Oct 05 21:03:57 domain.com systemd[1]: Started MariaDB database server.

Find the existing password

# cat /etc/psa/.psa.shadow
$AES-128-CBC$MnglmyKq3wJbZVgmb4YKTQ==$p/zX+xpnhJ20kIrrZiFsq7VLE3kI+86JwVdPYJtWdEE=[root@69-64-92-195 ~]#

Stop the database

]# systemctl stop mariadb.service

Edit my.cnf and add skip-grant-tables

[mysqld]
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
skip-grant-tables
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

Restart mysql

# systemctl restart mariadb.service

Reset the mysql password no

# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa
mysql> UPDATE mysql.user SET Password=PASSWORD('# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa
mysql> UPDATE mysql.user SET Password=PASSWORD('$AES-128-CBC......') WHERE User='admin';') WHERE User='admin';

Edit my.cnf and remove skip-grant-tables

[mysqld]
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
# skip-grant-tables
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

Update fails, logs are unavailable: “File specified by 766460e6-7587-54f1-e1be-794e5655c4a4 was not found”

The installation of micro-updates started from the Plesk home screen fails:
Failed to update Panel. You can send the update log to Parallels support to try fixing the issue. View the update log.

Attempting to access the update log fails:

Error Internal error: File specified by 766460e6-7587-54f1-e1be-794e5655c4a4 was not found Message File specified by 766460e6-7587-54f1-e1be-794e5655c4a4 was not found File LogFile.php Line 36 Type Smb_Exception_NotFound

Cause

The Plesk Installer has failed or was terminated.
Workaround

1) (Linux only) Remove the /tmp/psa-installer.lock file

2) Remove stale records from the ‘psa.longtasks’ and ‘psa.longtaskparams’ tables:

mysql -uadmin -p`cat /etc/psa/.psa.shadow`
mysql> use psa;
mysql> begin;
mysql> DELETE longtasks, longtaskparams FROM longtasks INNER JOIN longtaskparams WHERE longtasks.type='panel-update' AND longtaskparams.task_id=longtasks.id;
mysql> commit;

Install updates through Tools & Settings > Updates and Upgrades or from the command-line

# /usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --reinstall-patch --install-component base

If the update fails again, Check you logs:
/tmp/autoinstaller3.log
c:\ParallelsInstaller\autoinstaller3.log

PHP Fatal error: Allowed memory size of 262144 bytes exhausted when accessing plesk

Symptoms

When I use Plesk Migration Manager to migrate data manually I get the following error:

# tail -f /usr/local/psa/admin/logs/panel.log
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 64 bytes) in /usr/local/psa/admin/plib/backup/Conflicts/Detector/ConflictDetector.php on line 495

I get this error after starting import from the migration file /work_dir/dump.xml.
Resolution

There is not enough memory for Plesk Panel php. You need to increase memory_limit for Plesk Panel php in /usr/local/psa/admin/conf/php.ini file up to 512 Mb.

To check if settings were applied correctly you can run


/usr/local/psa/admin/bin/php -info | grep memory_limit
memory_limit => 1024 => 1024

Change to:

# memory_limit = 1024M