1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Help MySQL Problem

Discussion in 'Plesk for Linux - 8.x and Older' started by user1599, Jun 6, 2007.

  1. user1599

    user1599 Guest

    0
     
    ERROR: PleskFatalException
    Unable to connect to database: Unknown database 'psa'

    0: /usr/local/psa/admin/plib/common_func.php3:151
    psaerror(string 'Unable to connect to database: Unknown database 'psa'')
    1: /usr/local/psa/admin/auto_prepend/auth.php3:90


    what can i do to fix this, I cant access my plesk panel?

    I think my MYSQL database got damaged and lost the files, I am not sure though. Is there anyway to reinstall the database of plesk?

    I do have a mysql.daily.dump can i restore it with this?
     
  2. Hedgren

    Hedgren Guest

    0
     
    Please click one of the Quick Reply icons in the posts above to activate Quick Reply.
     
  3. Hedgren

    Hedgren Guest

    0
     
    woops, that was misclick
     
  4. Hedgren

    Hedgren Guest

    0
     
    So, the Plesk database is called 'psa', and you can check if it's present:

    > mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa

    Likely, you get:
    ERROR 1049 (42000): Unknown database 'psa'
    which means the database was dropped or renamed, it can be checked:
    > mysql -uadmin -p
    Enter password: {PLESK_ADMIN_PASS}
    mysql> show databases;

    Look if the InnoDB (or else) files are there:

    > ls -la /var/lib/mysql/psa
    ls: /var/lib/mysql/psa: No such file or directory

    Okay, now you need to restore psa database from a backup. See if some daily mysql dumps of 'psa' database are safe:

    > ls -la /var/lib/psa/dumps/
    total 1080
    drwxr-xr-x 5 psaadm psaadm 4096 Mar 23 04:07 .
    drwxr-xr-x 3 root root 4096 Mar 18 21:56 ..
    drwx------ 4 psaadm psaadm 4096 Mar 21 13:07 1
    drwx------ 4 psaadm psaadm 4096 Mar 22 21:19 2
    -rw------- 1 root root 111891 Mar 23 04:07 mysql.daily.dump.0.gz
    -rw------- 1 root root 109742 Mar 22 04:05 mysql.daily.dump.1.gz
    -rw------- 1 root root 108526 Mar 21 04:04 mysql.daily.dump.2.gz
    -rw------- 1 root root 99162 Mar 18 22:53 mysql.preupgrade.dump.gz
    -rw------- 1 root root 95501 Mar 18 21:56 mysql.preupgrade.dump.gz.1

    Uff, the backups are safe. Now, just restore it: http://kb.swsoft.com/en/881
    Good luck.
     
  5. mavera2

    mavera2 Basic Pleskian

    11
    85%
    Joined:
    Aug 9, 2013
    Messages:
    64
    Likes Received:
    0
    Actual link is like this:
    http://kb.parallels.com/en/881

    --------------
     
Loading...