Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Database Connection issue during install..

Langdon Giddens   ( User )

Commented 10 months ago

SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'PRIMARY'; check that column/key exists (Connection: mysql, SQL: alter table `hki_user_roles` drop primary key)

I receive this error when attempting to connect to the DB. It is clearly making the tables in the DB so I'm unsure why it would have issues like this.

Prodabit Prodabit   ( User )

Commented 10 months ago

MySQL/MariaDB in some versions does not accept the drop index format used by Laravel. I stayed all day to find out that my MySQL 8.1 was the problem. I installed MariaDB 10.2 and the installation completed without any problems.

Ario Rezaei   ( User )

Commented 9 months ago

Updating just in case someone else runs into the same issue. Had the same error pop up with Mysql 8.3 installed. I ran composer update in the main directly and migrations are now running. First time installing so I have to see if that breaks anything else.

Ario Rezaei   ( User )

Commented 9 months ago

Update 2, after running composer update, it complained about php version. I had 8.1 installed and it wanted 8.2 or above. Upgraded to php 8.3 and so far all seems to be running. Again first install just getting started but I hope this helps someone else.

Please login or register to leave a response.

Showing 1 to 4 of 4 discussions