%s/DEFAULT CHARACTER SET latin1/DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci/ %s/DEFAULT CHARSET=latin1/DEFAULT CHARSET=utf8/ wq Mysqldump -uusername -ppassword -c -e -default-character-set=utf8 -single-transaction -skip-set-charset -add-drop-database -B dbname > dump.sql If you have previously installed Moodle and are now getting the error the following process will allow you to convert your database. You can simply run the below query in your database to resolve the issue.Īlter database mydatabasename charset=utf8 If you have created your database schema and are receiving the error during your initial installation your Moodle database will still be empty. The difference is described in the unicode documentation page. Utf8_unicode and utf8_general are not the same but similar. skip-character-set parameter, will restore the database with your new default character set of utf8. Having made your default character set utf, a mysqldump restore of your database with the (This was good for ubuntu server lucid 10.04 2.6.32-24-server Jan 2011) To make mysql default to utf8 you can edit /etc/my.cnf as follows. The descriptions elsewhere in this section cover making the utf8 database versions using mysqldump. It is a database engine that is very widely used in open source projects and it contains details of all the stuff in your Moodle such as usernames etc and pointers to all the files that have been uploaded to it.ġ) Change your mysql to have utf8 as its character set and It is perhaps worth noting that Mysql is nothing to do specifically with Moodle. However the UTF8 check during install and upgrade was only been implemented in Moodle 2.0 and you may find you are unable to upgrade because your database was not set up originally as utf8 when you first installed Mysql or because you have been running Moodle since before 1.8 and haven't previously converted your database. Moodle requires UTF8 in order to provide better multilingual support and has done since Moodle 1.8. If you are upgrading, you should perform the UTF-8 migration process (see the Admin page). New installations must be performed into databases that have their default character set as Unicode. It is required that you store all your data in Unicode format (UTF-8). You may see the following error when upgrading your Moodle. 4.3 Special chars won't import correctly.4 Converting a database containing tables.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |