Skip to main content

Database does not support utf8mb4 charset

Comments

8 comments

  • andrew.n
    The easiest way is to convert the tables from PHPMyAdmin but make sure you backup the database beforehand so you can revert if there is any issues.
    0
  • toplisek
    1. You mean the following command? ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
    2. How to make it using Linux command? $ console core:convert-to-utf8mb4
    0
  • andrew.n
    You can also use the mysql prompt. If you logged in as root via SSH type "mysql" then hit enter and you will be at the prompt.
    0
  • cPJustinD
    Hello, toplisek! You can change the character sets using the methods andrew.n mentioned. However, we recommend making a backup of your databases before making any changes in case they need to be reverted. We would also advise working with your Database Administrator to implement these changes to ensure the changes are applied properly. Please note that cPanel, LLC only supports the cPanel-provided software and does not provide general system-administration services. You may, therefore, wish to seek assistance from a qualified system administrator for this issue. If you do not have such an administrator, you may search for one in our listings here: How Do I Change The Default Character Set in MySQL/MariaDB to utf8? I hope that this information helps. If you have any additional questions or concerns, please let us know!
    0
  • toplisek
    If I type mysql inside root, can be also modified only one username account not all MYSQL service for all accounts?
    0
  • cPJustinD
    Hello again toplisek! When logged into MySQL as root, you can still alter the character set and collation per database; however, it appears that it may also need to be enabled globally in MySQL. I found the following information online; however, that may help: Please keep in mind that the information I've provided above are from community forums, so there may be some information that does not apply specifically to your version of MySQL. If the information above does not help, it may be worth reaching out to your database or server administrator for further assistance.
    0
  • toplisek
    I have run: ALTER DATABASE DBNAMEXXX CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci Report is the following: MySQL returned an empty result set (i.e. zero rows). (Query took 0.0003 seconds.) Does it mean it actually supports utf8mb4 COLLATE = utf8mb4_unicode_ci?
    0
  • cPRex Jurassic Moderator
    @toplisek - that isn't the result I would expect. When I tried that command on a test database I created, I got the following result: Query OK, 1 row affected (0.00 sec)
    so I would expect that command to work. Do you see any errors in the MySQL log after running that command?
    0

Please sign in to leave a comment.