Hiển thị các bài đăng có nhãn PLESK. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn PLESK. Hiển thị tất cả bài đăng

Thứ Năm, 5 tháng 11, 2020

[Plesk] How to change default MySQL directory in Plesk Window

 Note: Custom data directory location for client's MySQL has been supported since Plesk 17.8 MU #41


To change database location follow next steps:

  1. Connect to the server using RDP as Administrator.

  2. Shut down MySQL service through Control Panel > Administrative Tools > Services > right-click MySQL57 > Stop.

    Note: if MysQL 5.6 is used, stop MySQL Server service instead.

  3. Copy "%plesk_dir%"\Databases\MySQL\data to the new location (e.g. D:\MySQL\data).

  4. Edit "datadir" option in the C:\"%plesk_dir%"\Plesk\Databases\MySQL\my.ini file in the following way:

    [MySQLD]
    port=3306
    ...
    datadir=D:\\MySQL\\Data
    ...

  5. Give "Full control" permission to the "NT SERVICE\MySQL57" group: right-click the destination folder > Properties > Security.

    Note: if MysQL 5.6 is used, Give "Full control" permission to the "NT SERVICE\MySQL56" group instead.

  6. Start "MySQL57" service Control Panel > Administrative Tools > Services > right-click MySQL57 > Start.

  7. To prevent "Plesk Reconfigurator" to change the path to the new folder location edit the C:\%plesk_dir%\etc\DiskSecurity.xml file in the following way:

    <!-- [PRODUCT_ROOT_D]\MySQL\bin -->
    ...
    <Entry AccounType="1" Domain="NT SERVICE" Account="MySQL57" Path="<D:\MySQL\Data>" AceFlags="FilesOnly" AccessMask="ReadAndExecute" EntryFlags="0x04" />
    ...

    Note: D:\MySQL\Data is the path to the new folder location and can be changed to any required one.

  8. To prevent the resetting of datadir value it is required to change the path in the MYSQL_DATA_D registry to the required one:
    1. 
    Click the Start button.
    2. Type regedit.exe and press the Enter button:


    3. In the opened Windows registry navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\PLESK\PSA Config\Config and find the MYSQL_DATA_D string which contains the actual database directory:

    Indexable text here
    4. Change this value to the required one:
    screenshot1.PNG

Thứ Bảy, 20 tháng 6, 2020

[PLESK] Cancel a stuck task in Plesk

Canceling a stuck task in Plesk for Linux

  1. Connect to the Plesk server via SSH.
  2. # plesk db dump > /root/psa_dump.sql
  3. Find stuck process(es):
    # plesk db "SELECT id,type,status,finishTime FROM longtasks WHERE status <> 'done'"

    +----+-----------------------------+---------+---------------------+
    | id | type                        | status  | finishTime          |
    +----+-----------------------------+---------+---------------------+
    | 56 | ext-wp-toolkit-task\install | started | 0000-00-00 00:00:00 |
    +----+-----------------------------+---------+---------------------+
  4. Delete the task from the longtasks table using id from step 3:
    # plesk db "DELETE FROM longtasks WHERE id=56"
  5. Delete entries from the longtaskparams table using id from step 3:
    # plesk db "DELETE FROM longtaskparams WHERE task_id=56"
  6. Kill the stuck process:
    # pkill task-async-executor
    Note: In case tasks keep getting stuck after performing the above actions, clear the lock manager using the below commands:
    # service sw-engine stop
    # rm -rf /var/lock/lmlib/container_locks
    # rm -f /usr/local/psa/var/cache/*
    # service sw-engine start


Canceling a stuck task in Plesk for Windows Server

  1. Connect to the Plesk server via RDP.
  2. C:\> plesk db dump > C:\psa_dump.sql
  3. Find stuck process(es):
    C:\> plesk db "SELECT id,type,status,finishTime FROM longtasks WHERE status <> 'done'"

    +----+-----------------------------+---------+---------------------+
    | id | type                        | status  | finishTime          |
    +----+-----------------------------+---------+---------------------+
    | 56 | ext-wp-toolkit-task\install | started | 0000-00-00 00:00:00 |
    +----+-----------------------------+---------+---------------------+
  4. Delete the task from the longtasks table using id from step 4:
    C:\> plesk db "DELETE FROM longtasks WHERE id=56"
  5. Delete entries from the longtaskparams table using id from step 4:
    C:\> plesk db "DELETE FROM longtaskparams WHERE task_id=56"

Thứ Tư, 9 tháng 11, 2016

[PLESK] Plesk 12 Microsoft FTP Service : 530 User cannot log in, home directory inaccessible.

Cho repair : %plesk_cli%\plesk repair ftp -y
https://kb.plesk.com/en/549 

Kiểm tra computer name khớp với user security

Thứ Ba, 15 tháng 4, 2014

[PLESK] How to retrieve Plesk admin password on Windows

How to retrieve Plesk admin password on Windows


Resolution

Plesk 12.5

Apart from the password reminder available on the login screen, you can use the plesksrvclient.exe utility located in the %plesk_bin% folder to set up a new password or retrieve the old one.

You can set up a new password by running the following command:
"%plesk_bin%\plesksrvclient" -set true

You can also retrieve the current password by running this utility with the following command:
"%plesk_bin%\plesksrvclient" -get

To retrieve the password in the command line, you can use the "-nogui" option:
"%plesk_bin%\plesksrvclient" -get -nogui > plesk_password.txt

After that, you can find the retrieved Plesk password in the plesk_password.txt file.

https://support.plesk.com/hc/en-us/articles/213410689


Plesk 17.8

Password Admin Plesk

plesk bin admin --set-admin-password -passwd "your_new_password"

Retrieve administrator's Plesk database password on Plesk 17.8 for Windows

In Plesk 17.8 included "plesk sbin psadb" utility for operate with admin DB password. To use it connect to the server via RDP and open cmd.exe as Administrator

plesk sbin psadb --help
Usage: psadb [OPTIONS]...
-g, --get-admin-password show the Plesk system databases Admin's password in console.
-c, --copy-admin-password copy the Plesk system databases Admin's password to clipboard.
-s, --set-admin-password --password=<new password> set the new Plesk system databases Admin's password in the database
and update it in Plesk.
-u, --update-admin-password --password=<new password> update the Plesk system databases Admin's password in Plesk only.
-h, --help display this help and exit

To reach administrator's password for Plesk database execute the following:

plesk sbin psadb --get-admin-password