Jump to content
Froxlor Forum

[Resolved] - SQLSTATE[42000]: Syntax error or access violation


Recommended Posts

Hi team. When I tried to upgrade from the admin panel, I got this error:

Websites are still running well, but I cannot acces to admin interface anymore.

Any ideas guys ?

A database error occurred

SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'guid'

 

01.JPG

00.JPG

Link to post
Share on other sites

That means there are duplicate keys for the field "guid" in either panel_customers and/or ftp_groups - which means you either did that manually before the update or somehow managed to not complete the database update from db-version 202005150 to 202007240.

The changes that are being done in that update process are the following:

ALTER TABLE panel_customers ADD INDEX guid (guid);
ALTER TABLE panel_tasks ADD INDEX type (type);
ALTER TABLE mail_users ADD INDEX username (username);
ALTER TABLE mail_users ADD INDEX imap (imap);
ALTER TABLE mail_users ADD INDEX pop3 (pop3);
ALTER TABLE ftp_groups ADD INDEX gid (gid);

So if your databaseversion in panel_settings is 202005150 but you already have these indexes set, you can either drop these indexes and let froxlor update re-create them or comment out these changes in the file install/updates/froxlor/0.10/update_0.10.inc.php (~656-661) 

Link to post
Share on other sites
15 minutes ago, d00p said:

That means there are duplicate keys for the field "guid" in either panel_customers and/or ftp_groups - which means you either did that manually before the update or somehow managed to not complete the database update from db-version 202005150 to 202007240.

The changes that are being done in that update process are the following:




ALTER TABLE panel_customers ADD INDEX guid (guid);
ALTER TABLE panel_tasks ADD INDEX type (type);
ALTER TABLE mail_users ADD INDEX username (username);
ALTER TABLE mail_users ADD INDEX imap (imap);
ALTER TABLE mail_users ADD INDEX pop3 (pop3);
ALTER TABLE ftp_groups ADD INDEX gid (gid);

So if your databaseversion in panel_settings is 202005150 but you already have these indexes set, you can either drop these indexes and let froxlor update re-create them or comment out these changes in the file install/updates/froxlor/0.10/update_0.10.inc.php (~656-661) 

Thanks.

Before your answered, I've edite the /var/www/froxlor/install/updates/froxlor/0.10 # vi update_0.10.inc.php file and comment few lines in this files.

It seems i've done it right :)

Thanks d00p !

 

02.JPG

Link to post
Share on other sites
  • Francois Barroero changed the title to [Resolved] - SQLSTATE[42000]: Syntax error or access violation

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...