• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Problem after restoring mysql databases

A

alexisdelamare

Guest
Hi everyone,

I had a problem with my server and restored mysql from a dump of all databases. Now when I try to login on Plesk panel, I get this :

ERROR: PleskMainDBException

MySQL query failed: Unknown column 'lifetime' in 'field list'

0: common_func.php3:217
db_query(string 'replace into sessions (sess_id, type, login, ip_address, login_time, click_time, lifetime) VALUES ("c47b17086b21c979fbf4d2cd010380c4", "1", "admin", "MYIPADDRESS", NOW(), NOW(), 1800)')
1: class.Session.php:362
Session->registerSession(integer '1', string 'admin', string 'MYIPADDRESS', NULL null, NULL null)
2: cmd_loginup.php:129
createSessionCommon(integer '1', string 'admin', boolean true, string 'MYIPADDRESS', NULL null, NULL null)
3: cmd_loginup.php:312
createSessionAdmin(string 'admin', string '**********', string '***************************', boolean false)
4: cmd_loginup.php:74
createSession(string 'admin', string '**********')
5: login_up.php3:40

I have no idea as to how to solve this... Any help would be greatly appreciated ;)
 
What is version of your Plesk. I see 'lifetime' field in 'sessions' table of Plesk 10.4.4 psa database:

mysql> desc sessions;
+------------+----------------------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+------------+----------------------+------+-----+-------------------+-----------------------------+
| sess_id | varchar(33) | NO | PRI | NULL | |
| type | smallint(5) unsigned | NO | | NULL | |
| login | varchar(255) | NO | | NULL | |
| ip_address | varchar(39) | NO | | NULL | |
| login_time | datetime | NO | | NULL | |
| click_time | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| modified | int(10) unsigned | YES | | NULL | |
| lifetime | int(10) unsigned | YES | | NULL | |
| data | mediumblob | YES | | NULL | |
+------------+----------------------+------+-----+-------------------+-----------------------------+

The same result for Plesk 10.2 database.
 
Not at all, I miss the last lines...

+------------+----------------------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+------------+----------------------+------+-----+-------------------+-----------------------------+
| sess_id | varchar(33) | NO | PRI | NULL | |
| type | smallint(5) unsigned | NO | | NULL | |
| login | varchar(255) | NO | | NULL | |
| ip_address | varchar(15) | NO | | NULL | |
| login_time | datetime | NO | | NULL | |
| click_time | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
+------------+----------------------+------+-----+-------------------+-----------------------------+
 
Ok, I get an error, the problem is that my hosting probably updated Plesk when I reinitialized my server, and the databases are not the same version. Here's the error log from the bootstrapper script :

===> Upgrading database

Trying to start service mysqld... mysqld (pid 24990) is running...
done
Trying to establish test connection... connected
done
Trying to find psa database... version is 01020
DATABASE ERROR!!!
Previous product version is 10.13.4, but previous database
version is 01020. In most of cases it is result of
previous upgrade try failure. Please, restore previous version
from backup, and try again or contact technical support.

ERROR while trying to check database version
Check the error reason(see log file: /tmp/plesk_10.4.4_installation.log), fix and try again

***** problem report *****
ERROR while trying to check database version
Check the error reason(see log file: /tmp/plesk_10.4.4_installation.log), fix and try again
 
Back
Top