Moodle Installation Error: Database unicode character

When installing Moodle on a new database, if the encoding is not set correctly, the following error will occur.

It is required that you store all your data in Unicode format (UTF-8).
New installations must be performed into databases that have their default
character set as Unicode. If you are upgrading, you should perform the
UTF-8 migration process (see the Admin page).

To fix this error, you will need to set the database collation in to utf8_unicode_ci through PhpMyAdmin. The following will explain how to do this.

Changing the database collation in PhpMyAdmin

  1. Login to your cPanel
  2. Navigate to Databases > PhpMyAdmin.
  3. Select the database on the left that was created for the Moodle site.
  4. On the top right click Operations.
  5. On the Collation drop box, select utf8_unicode_ci.
  6. Click Go.

Adjust the $CFG->dboptions array in your config.php to make sure that Moodle uses the right collation when connecting to the MySQL Server:

$CFG->dboptions = array(
  …
  'dbcollation' => 'utf8mb4_unicode_ci',
  …
);
  • 0 کاربر این را مفید یافتند
آیا این پاسخ به شما کمک کرد؟

مقالات مربوطه

Upload courses Backup to Moodle via FTP

The way to do it by using repositories. You need to create a folder in moodledata with the name...

How to backup and restore users in Moodle

Backup Users: Site admin -> users -> bulk user action -> select users -> add to...

Installing and upgrading help from 'mysql' to 'mariadb'

If the DB is not the correct DB - it will throw up an error. Moodle uses drivers for it's MariaDB...