![]() If you do not have the recommended full UTF-8 support select collation utf8_unicode_ci. If you have successfully configured the recommended full UTF-8 support as described above select collation utf8mb4_unicode_ci. If this is available you can use it to create a new database. PhpMyAdmin is a web based administration tool for MySQL. Make sure you invent a strong password and resist the temptation to 'GRANT ALL'. Mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO creates a user called 'moodleuser' with a password 'yourpassword'. Mysql> CREATE USER IDENTIFIED BY 'yourpassword' Add a user/password with the minimum needed permissions:.Mysql> CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci If you do not have the recommended full UTF-8 support run: Mysql> CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci If you have successfully configured the recommended full UTF-8 support as described above run: Create a new database (called 'moodle' - substitute your own name if required).After some pre-amble this should take you to the mysql> prompt. (Enter the password you previously set - or been given - for the MySQL 'root' user). To create a database using the 'mysql' command line client, first log into MySQL.An install on an old server may have the wrong settings. If you are not given a choice, the default options are probably good. You may get the option to set these values when you create the database. For Moodle, we recommend the Character Set be set to utf8mb4 and the Collation utf8mb4_unicode_ci. If they are on different machines substitute the name of the web server for 'localhost' in the following instructions and the 'dbhost' setting will be the name of the database server.ĭatabases have a "Character set" and a "Collation". In this case the 'dbhost' is 'localhost'. The instructions assume that the web server and MySQL server are on the same machine. Substitute your own database name, user name and password as appropriate. These are the steps to create an empty Moodle database. If for some reason you cannot change to the settings described here you can continue to install Moodle but you must select utf8 and utf8_unicode_ci for the default character set and collation respectively. If you have any difficulty applying these settings, see MySQL_full_unicode_support for further information. Restart the MySQL server process to apply these settings (for example with MariaDB on Linux: systemctl restart mariadb). Innodb_large_prefix = 1 # Remove line if not needed Innodb_file_format = Barracuda # Remove line if not needed Note: Other systems with databases on this server may be impacted by this change.Īdd the following settings to the configuration file, do not add innodb_file_format = Barracuda and innodb_large_prefix = 1 if these were blank or missing when you ran SHOW GLOBAL VARIABLES above:.Note: Back up all databases before making this change.Note: Back up the configuration file before changing it.On Linux this may be /etc/my.cnf, /etc/mysql/my.cnf, or /etc/my.cnf.d/mariadb-server.cnf on Microsoft Windows it may be my.ini. If your settings do not match any list you will have to edit the MySQL configuration file. If the settings you see match any list above then no changes are needed and you can skip to Creating Moodle database. SHOW GLOBAL VARIABLES WHERE variable_name IN ('innodb_file_format', 'innodb_large_prefix', 'innodb_file_per_table') It is possible to do this after installing your site but is much easier and quicker before installation.Ĭheck if this is already configured by running the following statement, e.g. If this is not done some character sets – notably emojis – cannot be used. It's recommended that full UTF-8 support is configured in MySQL. Otherwise, Moodle will not be able to write to the database. If you are going to use Master/Slave replication, you must add binlog_format = 'ROW' into your my.cnf within.Increase the 'max_allowed_packet' setting to at least 4 megabytes. The default configuration is usually very conservative in respect of memory usage versus performance. Consider installing and configuring my.cnf (the MySQL settings file) to suit your needs.Make sure you set a password for the 'root' user (see ).It is possible and reasonably straightforward to build mysql from source but it is not recommended (the pre-built binaries are supposedly better optimised).There are installers available for most popular operating systems at.However, you can also use apt-get or yum depending on the distribution that you are running. ![]() This ensures you will get any available updates. If you are running Linux your preference should be to install using your distribution's package manager.3 Which database belongs to which Moodle. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |