Pages

Wednesday, 3 September 2014

Unknown column 'owner' in 'where clause'

Plesk Websites & Domains tab not accessible, Error noticed:

Error message or request description : When you attempt to open Websites & Domains tab:
Internal error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'owner' in 'where clause'
Message         SQLSTATE[42S22]: Column not found: 1054 Unknown column 'owner' in 'where clause'
File    Pdo.php
Line    234
Type    Zend_Db_Statement_Exception
This is because column `owner` missing from psa.longtasks table.
So to add this column run the below query:

1. Login to psa (mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa )

2. Run: 
mysql> alter table longtasks add owner int(10) unsigned;

Monday, 1 September 2014

Plesk Upgrade failed : `Cannot load from mysql.proc. The table is probably corrupted`

Error while Upgrading Plesk,
ERROR 1548 (HY000) at line 67: Cannot load from mysql.proc. The table is probably corrupted

1. Make sure mysql tables are not corrupted. You can use mysqlcheck  utility to do so.
mysqlcheck -uadmin -p`cat /etc/psa/.psa.shadow`

If everything looks fine here, go for alternative solutions like repair table (repair table mysql.proc) or;
enable mysql debug log and find the exact error in logs.

Also please make sure that you have checked mysqld.log file,
if you find something like "Incorrect definition of table mysql.proc: expected column 'comment' at position 15 to have type text, found type char(64)."  in mysqld.log file, then you need to ad the missing column in proc table.

Login to mysql and run:
mysql> alter table proc change comment comment text;