Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng

Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng (http://quantrinet.com/forum/index.php)
-   Hướng dẫn sử dụng Plesk (http://quantrinet.com/forum/forumdisplay.php?f=195)
-   -   Reset the Plesk MySQL Password (http://quantrinet.com/forum/showthread.php?t=9125)

hoctinhoc 28-03-2012 02:43 PM

Reset the Plesk MySQL Password
 

Reset the Plesk MySQL Password

SSH [Mac | Windows] into the server as the 'root' user
Stop the MySQL process by running the command:

/etc/init.d/mysqld stop

Run the command:

Mã:

    /usr/bin/ 'ls /usr/bin |grep mysql |grep safe' --skip-grant-tables
If the above command returns "No such file or directory," try the command:

Mã:


        /usr/bin/safe_mysqld --skip-grant-tables

If that command returns "No such file or directory," try the command:

Mã:

        /usr/bin/mysqld_safe --skip-grant-tables
Next, start MySQL:

Mã:


    /etc/init.d/mysqld start

Log into MySQL with the command (you won't need to use a password or username due to the --skip-grant-tables command above):

Mã:

mysql;

Change to the MySQL database:

Mã:

    use mysql;
Update the 'admin' password (replace PLESK_PASSWORD with the correct password):

Mã:


    update user set Password=password('PLESK_PASSWORD') where User='admin';

Flush any remaining privileges by running the command:

Mã:

    flush privileges;
Exit the MySQL command prompt:

Mã:

    quit
Now, restart the MySQL service by running:

Mã:


    /etc/init.d/mysqld restart

Lastly, confirm the plesk password is listed in /etc/psa/.psa.shadow via the command:

Mã:

    cat /etc/psa/.psa.shadow
:battay:


Bây giờ là 11:50 AM. Giờ GMT +7

Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.