Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql.connector.errors.DatabaseError: 1273 (HY000): Unknown collation: 'utf8mb4_0900_ai_ci' #59

Open
TheGreenJoker opened this issue Nov 7, 2024 · 0 comments

Comments

@TheGreenJoker
Copy link

Hi,

I created a SQL user and a SQL Database. BUT:
An error occured;

`(.py-env) julien@Nitro-V-Arch ~/C/D/P/T/TikTok Server (master)> python3 main.py
Found config in location /home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/TikTok Server/config.ini
Found config in location /home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/TikTok Server/config.ini
Traceback (most recent call last):
File "/home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/.py-env/lib/python3.10/site-packages/mysql/connector/connection_cext.py", line 706, in cmd_query
self._cmysql.query(
_mysql_connector.MySQLInterfaceError: Unknown collation: 'utf8mb4_0900_ai_ci'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/TikTok Server/main.py", line 79, in
database.startDatabase()
File "/home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/TikTok Server/database.py", line 10, in startDatabase
beginDatabaseConnection()
File "/home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/TikTok Server/database.py", line 29, in beginDatabaseConnection
connection_pool = pooling.MySQLConnectionPool(
File "/home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/.py-env/lib/python3.10/site-packages/mysql/connector/pooling.py", line 490, in init
self.add_connection()
File "/home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/.py-env/lib/python3.10/site-packages/mysql/connector/pooling.py", line 613, in add_connection
cnx = connect(**self._cnx_config) # type: ignore[assignment]
File "/home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/.py-env/lib/python3.10/site-packages/mysql/connector/pooling.py", line 322, in connect
return CMySQLConnection(*args, **kwargs)
File "/home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/.py-env/lib/python3.10/site-packages/mysql/connector/connection_cext.py", line 151, in init
self.connect(**kwargs)
File "/home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/.py-env/lib/python3.10/site-packages/mysql/connector/abstracts.py", line 1438, in connect
self._post_connection()
File "/home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/.py-env/lib/python3.10/site-packages/mysql/connector/abstracts.py", line 1378, in _post_connection
self.set_charset_collation(charset=self._charset_id)
File "/home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/.py-env/lib/python3.10/site-packages/mysql/connector/abstracts.py", line 1353, in set_charset_collation
self._execute_query(f"SET NAMES '{charset_name}' COLLATE '{collation_name}'")
File "/home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/.py-env/lib/python3.10/site-packages/mysql/connector/opentelemetry/context_propagation.py", line 97, in wrapper
return method(cnx, *args, **kwargs)
File "/home/julien/Code/Download/Python/TikTok-Compilation-Video-Generator/.py-env/lib/python3.10/site-packages/mysql/connector/connection_cext.py", line 714, in cmd_query
raise get_mysql_exception(
mysql.connector.errors.DatabaseError: 1273 (HY000): Unknown collation: 'utf8mb4_0900_ai_ci'
`
I don't now what to do, need some help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant