Back

MySQL8 External DB: SQLSTATE[42000]: Syntax error or access violation: 1064

  • 0
  • Self Hosted
Drake
21 Oct, 2023, 23:04

Did you do that yet?

TL;DR
The user is discussing their experience with upgrading servers and using a docker-compose.override.yml file. They mention an issue with a syntax error or access violation when using MySQL8 External DB. They discuss the importance of keeping the docker-compose.yml file generated by Appwrite untouched and customizing in a docker-compose.override.yml file. There is a suggestion to update the .env file instead of the docker-compose file. The user asks about updating to version 1.4.7 without changing the .env file. Finally, the user asks if someone has tried a specific solution but does not mention if they have tried it themselves. No solution is provided in
liga
22 Oct, 2023, 00:31

Yes. But it doesn’t seems to work, I tried placing just mysql, but reading the code further the line, I think I need to place a connection string. I will try that next

liga
22 Oct, 2023, 02:50

should work, as it creates a DSN

liga
22 Oct, 2023, 02:54

ok, so the way that one works it's a bit weird because it's not meant completely to work that way but like a 'patched' way lol

liga
22 Oct, 2023, 02:54

it should have someting={Connection String}

liga
22 Oct, 2023, 02:56

so, to follow the same format as the fallbackForDB variable which is the one that creates the 'mariadb' connection I added db_main= before

liga
22 Oct, 2023, 02:57

So in order to have it for posterity:

_APP_CONNECTIONS_DB_CONSOLE=db_main=mysql://user:password@mysqlhost:port/database_name

_APP_CONNECTIONS_DB_PROJECT=db_main=mysql://user:password@mysqlhost:port/database_name

liga
22 Oct, 2023, 03:15

all good now <:appwritemandancing:946072376079188039>

liga
24 Oct, 2023, 16:58

How can I update to 1.4.7 manually? So my .env won't change?

Drake
24 Oct, 2023, 17:24

what's wrong with changing your .env file?

liga
24 Oct, 2023, 17:26

Well, not only my env, also my docker-compose.yml, it has all the entries for the db connection, if I run de the upgrade entrypoint it will change that docker-compose file and the env, right?

liga
24 Oct, 2023, 17:27

I was just wondering if there is a way to upgrade without that entrypoint

Drake
24 Oct, 2023, 17:28

uhhhhhhhh the best thing to do is to keep the docker-compose.yml file generated by Appwrite as untouched as possible and put your customizations in a docker-compose.override.yml file

Drake
24 Oct, 2023, 17:29

yes, upgrade will essentially wipe the docker-compose.yml file. the .env may be updated as well, but old values should retain

liga
24 Oct, 2023, 17:48

Yeah, just tested it and it deletes my old env vars, the db connection string, I'll try bumping up the image versions tho, if that's the only thing that has changed from 1.4.6

Drake
24 Oct, 2023, 17:56

You should be putting env vars in the .env file, not the docker compose file.

Drake
24 Oct, 2023, 17:57

I highly discourage manually upgrading because who knows what you might miss

liga
24 Oct, 2023, 17:57

I place those on my env file

liga
24 Oct, 2023, 17:58

I will compare the work that has to be done, like recreating my docker-compose file,

liga
24 Oct, 2023, 17:58

Thanks

Drake
24 Oct, 2023, 18:00

and again, i highly encourage using a docker-compose.override.yml file as much as you can

liga
24 Oct, 2023, 18:09

Yes, I agree, thanks

liga
24 Oct, 2023, 18:11

I did two servers upgrades with different approaches to know the differences, both worked the same

Drake
24 Oct, 2023, 18:12

the upgrade from 1.4.6 to 1.4.7 was very minor (just the version bump), but there are other times where the change is much bigger. in those cases, you really don't want to miss things

liga
24 Oct, 2023, 18:13

For sure, with that in mind, I was testing some other things that we can do like horizontal scaling

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more