#Discord bot, Database
16 messages · Page 1 of 1 (latest)
What SQL commands are you executing?
You can’t do CREATE DATABASE queries
through the bot, only CREATE TABLE, INSERT and DELETE table, not trying to create databases.
The thing is the bot hasn't even come online, seems like remote access to the database is blocked or something?
Oh wait are you hosting the database through bisect as well or are you hosting it elsewhere?
NVM I can see you’re using a bisecthosting.com host
So yeah it is
Should I host it somewhere else then?
And your queries respect the database name? In a query you could add a clause that would use a different database than you’re connected to
No I was just confused for a second. Ignore it
They do yea
I've added the port to the code, that error was gone, now I'm getting
mysql.connector.errors.DatabaseError: 1273 (HY000): Unknown collation: 'utf8mb4_0900_ai_ci'
Idk what's wrong now
In that case you were connecting to someone else’s database which you won’t have access to haha
Your sql queries are using a different collation than the database is using
Your queries use utf8mb4_0900_ai_ci but the server uses utf8mb4_unicode_ci
Got it, had to specify charset and collation in the code for it to work