How to Insert the Special Characters in MySQL
If we try to save unusual things in our database we experiences problems with character set. For example when we try to register the emojis if you didn't set the character set correctly we can not save in our database. To save special characters such as emoji we need to indicate the character set as utf8mb4_general_ci
for our database and tables.
Firstly if you are going to make any changes in database first run this query below.
ALTER DATABASE dbName CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci;
Then change your tables in same way
ALTER TABLE tableName CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
Now you may save your special characters. If still there is a problem make sure that you did related part correctly in my this article.
Comments
Popular Articles
Popular Tags
- #directive
- #Function
- #React
- #Class
- #centOS
- #Json
- #Text
- #API
- #URL
- #Encrypting
- #Redirect
- #Form
- #Special Characters
- #Special
- #Random
- #Generating
- #SASS
- #Version
- #Installation
- #Show
- #
- #Ajax
- #method
- #Logic For Displaying Posts
- #Key
- #DDOS
- #Default Value
- #Comment Line
- #1364 Field
- #Error
- #Abbreviation
- #QR Code Generating
- #Date
- #timeAgo
- #cURL
- #Array
- #Arrays with Key Values to String Statement
- #Short Tag
- #Vite
- #Reading Excel Files
- #Activate
- #Reading
- #Composer
- #Autoloader
- #PSR-4
- #Insert
- #Record
- #Real Time
- #Characters
- #Socket.io
There are no comments, make the firs comment