I am trying to Import My database But I am facing the following error: Error 1273 (HY000) at line 25 Unknown collation: ‘utf8mb4_0900_ai_ci’ in Mysql. In this Exerror article, We are going to learn about How to reproduce this error and we will discuss All Possible Solutions Lets Get Start with This Article.
How Error 1273 (HY000) at line 25 Unknown collation: ‘utf8mb4_0900_ai_ci’ Occurs?
I am trying to Import My database But I am facing the following error:
Error 1273 (HY000) at line 25 Unknown collation: 'utf8mb4_0900_ai_ci'
So here I am writing all the possible solutions that I have tried to resolve this error.
How To Solve Error 1273 (HY000) at line 25 Unknown collation: ‘utf8mb4_0900_ai_ci’?
How To Solve Error 1273 (HY000) at line 25 Unknown collation: ‘utf8mb4_0900_ai_ci’?
To Solve Error 1273 (HY000) at line 25 Unknown collation: ‘utf8mb4_0900_ai_ci’ First of all, Open Your SQL file in any editor and then find all utf8mb4_unicode_ci and replace all with this line utf8_general_ci Then, find all utf8mb4_unicode_520_ci and replace all with this line utf8_general_ci Now, find all utf8mb4 and replace all with this line utf8 Now, You can import your SQL file without any error. Thanks.
Error 1273 (HY000) at line 25 Unknown collation: ‘utf8mb4_0900_ai_ci’
To Solve Error 1273 (HY000) at line 25 Unknown collation: ‘utf8mb4_0900_ai_ci’ you need to change your CHARSET. And then Your error will be solved. This error Usually Occurs Cause of Older versions of MYSQL. To change CHARSET First of All Make sure you have a Backup of your SQL file and then try to change. Now Open your SQL file in any error I am Using VS Code and Find this below Line in Your SQL file: ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; And Replace the Above line with the below line: ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; Save your SQL file and then retry to Import this SQL file Now, Your error Must be solved. Thank You.
Solution 1: Change CHARSET
To Solve Error 1273 (HY000) at line 25 Unknown collation: ‘utf8mb4_0900_ai_ci’ you need to change your CHARSET. And then Your error will be solved. This error Usually Occurs Cause of Older versions of MYSQL. To change CHARSET First of All Make sure you have a Backup of your SQL file and then try to change.
Now Open your SQL file in any error I am Using VS Code and Find this below Line in Your SQL file.
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
And Replace the Above line with the below line.
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
Save your SQL file and then retry to Import this SQL file Now, Your error Must be solved. Thank You.
Solution 2: Use This
- First of all, Open Your SQL file in any editor and then find all utf8mb4_unicode_ci and replace all with this line utf8_general_ci
- Then, find all utf8mb4_unicode_520_ci and replace all with this line utf8_general_ci
- Now, find all utf8mb4 and replace all with this line utf8
- Now, You can import your SQL file without any error.
- Thanks.
Conclusion
It’s all About this error. I hope We Have solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read
- SyntaxError: Unexpected token < in JSON at position 0
- Warning: Use the ‘defaultValue’ or ‘value’ props on select instead of setting ‘selected’ on option
- ‘X’ is not defined react/jsx-no-undef
- Uncaught TypeError: Cannot read property ‘pathname’ of undefined
- Error: only absolute urls are supported