MySQL query failed Table psa.lockout doesn’t exist.
This issue can arise after an upgrade of Plesk 9.5 on attempt at logging in to the Plesk panel, you get the following error.
MySQL query failed: Table ‘psa.lockout’ doesn’t exist
db_query(string ‘delete from lockout where (UNIX_TIMESTAMP(NOW())
-UNIX_TIMESTAMP(last_wrong)) > (30 * 60)’)
createSession(string ‘admin’, string ‘********’)
Part of the Plesk login process checks if the account is locked or not and is missing after the upgrade (I suspect security updates).
The fix is simple just recreate the table.
mysql -uadmin -p`cat /etc/psa/.psa.shadow`
mysql> CREATE TABLE `lockout` (
-> `login` varchar(20) character set utf8 NOT NULL default ”,
-> `last_wrong` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
-> `attempts` int(11) NOT NULL default ‘1’,
-> PRIMARY KEY (`login`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=latin1
Parallels dev could have added this to the login function after the upgrade, but fair play to them or at least benefit of the doubt it could leave the panel open to exploitation If they had. For example brute force and/or MySQL injection. Those kind of exploits could grant a Plesk login and is practically root at web server level but it could also be used to escalate higher privilages.