• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • 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.

Issue Db_Table_Exception Admin-User

adminrights

New Pleskian
Server operating system version
latest
Plesk version and microupdate number
latest
Hi Board,

after updating some stuff over SSH my Linux-Server with Plesk running perfect - but i got no chance to login into Plesk.
It tells me:

500 Db_Table_Exception​

Dependent row(s) 'smb_roles.id = 1' isn't found for 'smb_users.roleId = 1'.

TypeDb_Table_Exception
MessageDependent row(s) 'smb_roles.id = 1' isn't found for 'smb_users.roleId = 1'.
FileAbstract.php
Line308

So i`m pretty bloody in mySQL and SSH.
How can i fix it?
 
Have you tried to fix this database inconsistency with

# plesk repair db -y

?
 
Yes. No change.


Checking the Plesk database using the native database server tools .. [OK]

Checking the structure of the Plesk database ........................ [OK]

Checking the consistency of the Plesk database

Inconsistency in the table 'smb_users' for the column roleId: No
rows in the table 'smb_roles' with id = 1 ......................... [ERROR]

Error messages: 1; Warnings: 0; Errors resolved: 0
 
It seems there is no id with the value "1" in the smb_roles table of the psa database.

Ideally, this table should look the following way:

Code:
mysql> select * from smb_roles;
+----+------------------+-----------+---------+
| id | name             | isBuiltIn | ownerId |
+----+------------------+-----------+---------+
|  1 | Admin            |         1 |       1 |
|  2 | WebMaster        |         0 |       1 |
|  3 | Application User |         0 |       1 |
|  4 | Accountant       |         1 |       1 |
+----+------------------+-----------+---------+

To fix the issue, perform the following steps:

- Enter Plesk system database with the command:

# plesk db

- Check the content of the table with the command:

mysql> select * from smb_roles;

- In case of tables are missing, add them with corresponding queries:

mysql> INSERT INTO `smb_roles` VALUES (1,'Admin',1,1);
mysql> INSERT INTO `smb_roles` VALUES (2,'WebMaster',0,1);
mysql> INSERT INTO `smb_roles` VALUES (3,'Application User',0,1);
mysql> INSERT INTO `smb_roles` VALUES (4,'Accountant',1,1);

- Try to access Plesk again.
 
It says:
mysql> select * from smb_roles;
Empty set (0.00 sec)

mysql> INSERT INTO `smb_roles` VALUES (1,'Admin',1,1);
ERROR 1136 (21S01): Column count doesn't match value count at row 1
 
The @IgorG 's idea works for me, with a little change:
1. (If you read this in the feature) "DESCRIBE smb_roles;" to show the table structure; This will give you information about what is optional or with default value and what it doesn't.
2. For me, at this moment (plesk update every time) work this:
INSERT INTO smb_roles(name) VALUES('Admin');
INSERT INTO smb_roles(name) VALUES('WebMaster');
INSERT INTO smb_roles(name) VALUES('Application User');
INSERT INTO smb_roles(name) VALUES('Accountant');
That works beacause id is autoincrement... May be you will need to fix other thinks
 
@yprevot If you need to run these commands after each Plesk update, something is very basically wrong with the installation. A Plesk upgrade should not and normally does not corrupt the database. I suggest to let support staff investigate and fix this on your server.
 
Back
Top