Results 1 to 4 of 4

Thread: Mysql Commands for Plesk Control Panel

  1. #1

    Default Mysql Commands for Plesk Control Panel

    Q. How do I take mysqldump backup of the database with "admin" user?

    Ans :
    mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` dbname > backupfile.sql
    Q. How do I restore the mysqldump backup to the empty database with "admin" user?

    Ans :
    mysql -uadmin -p`cat /etc/psa/.psa.shadow` dbname < backupfile.sql

    The command " cat /etc/psa/.psa.shadow " returns the password for admin user.

    One can explicitely metion admin password in the command like below.

    Assume that the admin user has password 123admin321, then commands will be.

    mysqldump -uadmin -p123admin321 dbname > backupfile.sql

    mysql -uadmin -p123admin321 dbname < backupfile.sql

    : No space after -u or -p

  2. #2

    Default Mysqlcheck commands for Plesk

    Here are two more important commands

    Mysql check to Repair
    mysqlcheck -uadmin -p`cat /etc/psa/.psa.shadow` -r databasename
    Mysql check to Optimize

    mysqlcheck -uadmin -p`cat /etc/psa/.psa.shadow` -o databasename

  3. #3
    Join Date
    Sep 2011
    Posts
    12

    Default

    Hello,
    Really amazing information and views you have put up here,
    This will helpful for user’s of this forum.

  4. #4
    Join Date
    Feb 2010
    Posts
    121

    Default

    Quote Originally Posted by ivaak View Post
    Hello,
    Really amazing information and views you have put up here,
    This will helpful for user’s of this forum.
    I hope you would try to contribute something similar rather than just complimenting others posts.
    Last edited by oliver; 04-10-2012 at 10:23 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •