SlideShare a Scribd company logo
1 of 26
Copyright 2020 Severalnines AB
Lukas Vileikis, Marketing Manager, Severalnines
Presenter
lukasvileikis.com
lukas@severalnines.com
Managing the Moodle Database: Getting
Started
January 27th, 2021
Copyright 2020 Severalnines AB
Copyright 2019 Severalnines AB
Agenda
2
Copyright 2020 Severalnines AB
Agenda
● What is the Moodle Database?
● Moodle Database Configuration
● What to Monitor in the Moodle Database?
● Moodle Database Schema
● Database Activity in Moodle
● Managing the Moodle Database with ClusterControl
3
Copyright 2020 Severalnines AB 4
● Moodle database stores
○ all of the information related to Moodle.
● Moodle supports MySQL, MariaDB, PostgreSQL, MS SQL and Oracle
databases.
● The most frequently used database for Moodle is MySQL.
What is the Moodle Database?
Copyright 2020 Severalnines AB 5
Copyright 2020 Severalnines AB 6
● Moodle has thousands of plugins available - the plugin list includes
1,769 plugins.
○ The plugin list includes gamification plugins, questionnaire
plugins, certificate plugins etc.
○ Each plugin comes with its own schema.
Moodle Plug-ins
Copyright 2020 Severalnines AB
Copyright 2019 Severalnines AB
Moodle Database Configuration and
Monitoring
7
Copyright 2020 Severalnines AB 8
● Moodle Database Configuration File @ /var/www/html/moodle/config.php:
$CFG->dbtype = 'mariadb'; // 'pgsql', 'mariadb', 'mysqli', 'sqlsrv' or 'oci'
$CFG->dblibrary = 'native'; // 'native' only at the moment
$CFG->dbhost = '10.10.10.134'; // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname = 'moodle'; // database name, eg moodle
$CFG->dbuser = 'moodleuser'; // your database username
$CFG->dbpass = 'moodlepass'; // your database password
$CFG->prefix = 'mdl_'; // prefix to use for all table names
$CFG->dboptions = array(
'dbpersist' => false, // ‘false’ - most stable setting, ‘true’ sometimes improves performance
'dbsocket' => false, // Should connection via UNIX socket be used?
'dbport' => '', // The TCP port. Leave empty for the default port
'dbhandlesoptions' => false, // pgbouncer doesn’t support advanced options on connection
'dbcollation' => 'utf8mb4_unicode_ci' // database collation, best to leave at default
);
Moodle Database Configuration
Copyright 2020 Severalnines AB 9
Copyright 2020 Severalnines AB 10
What to Monitor in Moodle?
What to Do? How to Do It?
Take two things into account Take into account the OS and the
database.
Monitor the metrics in the context of your
system
Look for alterations in the behavioral
patterns: excessive CPU usage might be a
problem, high RAM usage probably means
that you need to check your DB
configuration, high load average could be
generated by excessive CPU, RAM or disk
usage.
Monitor your database Monitor your queries, the amount of active
sessions, database locks etc.
Copyright 2020 Severalnines AB 11
What to Monitor in Moodle?
What to Monitor? How to Do It?
Queries Know what data they access, are they
using indexes or partitions, what are their
patterns. Use EXPLAIN.
Active sessions If the number is high, increment the
maximum value or check if something is
wrong.
Database locks If you have a query waiting for another
query, check if it should be running in the
first place.
Backups Make sure they are up to date and can be
restored.
Copyright 2020 Severalnines AB
Copyright 2019 Severalnines AB
Moodle Database Schema
12
Copyright 2020 Severalnines AB 13
Moodle Database Schema
What do You Need to Do to Begin
Working with Moodle?
How to Do It?
Create a database that stores the Moodle
tables in MySQL, change the default
character set and collation to UTF-8, also
grant privileges.
Run the following queries:
CREATE DATABASE moodle DEFAULT
CHARACTER SET UTF8;
GRANT ALL PRIVILEGES ON moodle.*
TO ‘moodleuser’@’localhost’
IDENTIFIED BY ‘password’;
FLUSH PRIVILEGES;
Keep in mind the effects of the privileges. Keep in mind that GRANT ALL
PRIVILEGES allows a MySQL user full
access to a designated database.
Copyright 2020 Severalnines AB 14
Moodle Database Schema
Category of Database Schemas About
Configuration tables Consists of the following tables:
config, config_log, config_plugins
Users and their profile tables Consists of the following tables:
user, user_enrolments,
user_info_category,
user_info_data, user_info_field,
user_lastaccess,
user_preferences,
user_private_key
Copyright 2020 Severalnines AB 15
● Moodle’s database activity allows you to build, display and search
entries (files, images, links to websites, text...) on a topic of your
choice.
● Activities can be:
○ Moderated
○ Commented
○ Rated
○ Displayed as a list or individually
Database Activity in Moodle
Copyright 2020 Severalnines AB 16
● To add a database activity, turn on the editing, then select database
from the activity chooser. Database activities can also have names
and descriptions:
Database Activity in Moodle
Log in as a teacher,
then turn on editing.
Copyright 2020 Severalnines AB 17
● Database activities work through views
○ student views and teacher views
● In a student view, students can click
on the Database icon in the course
to access it and add entries.
● In a teacher view,
teachers can see the set up tabs and can edit, delete, approve and
unapprove entries as required.
Database Activity in Moodle – How Does it
Work?
Copyright 2020 Severalnines AB
Copyright 2019 Severalnines AB
Moodle Database and ClusterControl
18
Copyright 2020 Severalnines AB 19
● ClusterControl can help you with load balancing, adding or removing
slave nodes, automatic failover and recovery, backups and more:
○ Monitor your database servers in real-time
○ Create alerts which inform of events in your database
○ Scale-out your database
■ multi-master
■ primary with multiple secondaries
Monitoring the Moodle Database with
ClusterControl
Copyright 2020 Severalnines AB 20
● Provides a unified view of all DB instances (even across multiple
datacenters) letting you see the big picture or individual nodes.
● Backup management
○ Centralizes backups to protect, secure and recover your data
○ Backup verification feature to ensure backups are restorable
○ Support for different native backup methods
■ XtraBackup, MariaBackup, pg_basebackup, pgbackrest,
among others...
Monitoring the Moodle Database with
ClusterControl
Copyright 2020 Severalnines AB 21
Monitoring the Moodle Database with
ClusterControl
What can ClusterControl help with? How?
Security Manage database users and roles
(ClusterControl -> Your Cluster -> Manage
-> Schema and Users (or User
Management for PostgreSQL).
Logs See the ClusterControl log section.
Integration with your custom automation
scripts
s9s CLI available
Copyright 2020 Severalnines AB 22
Hardware specs
(CPU clock, cores, disk subsystem, RAM, swap, NIC, etc)
Hardware specs
(CPU clock, cores, disk subsystem, RAM, swap, NIC, etc)
Monitoring the Moodle Database with
ClusterControl - Backups
mysqldump, Percona
XtraBackup, MariaDB
Backup, NDB Backup
Backups can be
uploaded to the cloud
and restored
Copyright 2020 Severalnines AB 23
Monitoring the Moodle Database with
ClusterControl - Overview
Copyright 2020 Severalnines AB 24
Monitoring the Moodle Database with
ClusterControl - Query Monitoring
Copyright 2020 Severalnines AB 25
Adding a New Integration
Copyright 2020 Severalnines AB
Lukas Vileikis, Severalnines
Severalnines.com
lukasvileikis.com
Thank You! ☺
26

More Related Content

What's hot

MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)Aurimas Mikalauskas
 
Basic oracle-database-administration
Basic oracle-database-administrationBasic oracle-database-administration
Basic oracle-database-administrationsreehari orienit
 
Oracle Architecture
Oracle ArchitectureOracle Architecture
Oracle ArchitectureNeeraj Singh
 
Microsoft Offical Course 20410C_03
Microsoft Offical Course 20410C_03Microsoft Offical Course 20410C_03
Microsoft Offical Course 20410C_03gameaxt
 
Data Grids with Oracle Coherence
Data Grids with Oracle CoherenceData Grids with Oracle Coherence
Data Grids with Oracle CoherenceBen Stopford
 
Virtualization and its Types
Virtualization and its TypesVirtualization and its Types
Virtualization and its TypesHTS Hosting
 
Presentation oracle net services
Presentation    oracle net servicesPresentation    oracle net services
Presentation oracle net servicesxKinAnx
 
Oracle architecture
Oracle architectureOracle architecture
Oracle architectureSoumya Das
 
MySQL Architecture and Engine
MySQL Architecture and EngineMySQL Architecture and Engine
MySQL Architecture and EngineAbdul Manaf
 
Multidimentional data model
Multidimentional data modelMultidimentional data model
Multidimentional data modeljagdish_93
 
Storage Virtualization
Storage VirtualizationStorage Virtualization
Storage VirtualizationMehul Jariwala
 
Virtualization and cloud computing
Virtualization and cloud computingVirtualization and cloud computing
Virtualization and cloud computingDeep Gupta
 
VTU 6th Sem Elective CSE - Module 4 cloud computing
VTU 6th Sem Elective CSE - Module 4  cloud computingVTU 6th Sem Elective CSE - Module 4  cloud computing
VTU 6th Sem Elective CSE - Module 4 cloud computingSachin Gowda
 

What's hot (20)

MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
 
Basic oracle-database-administration
Basic oracle-database-administrationBasic oracle-database-administration
Basic oracle-database-administration
 
IIS
IISIIS
IIS
 
Oracle Architecture
Oracle ArchitectureOracle Architecture
Oracle Architecture
 
Microsoft Offical Course 20410C_03
Microsoft Offical Course 20410C_03Microsoft Offical Course 20410C_03
Microsoft Offical Course 20410C_03
 
Database security
Database securityDatabase security
Database security
 
Data Grids with Oracle Coherence
Data Grids with Oracle CoherenceData Grids with Oracle Coherence
Data Grids with Oracle Coherence
 
Virtualization and its Types
Virtualization and its TypesVirtualization and its Types
Virtualization and its Types
 
Presentation oracle net services
Presentation    oracle net servicesPresentation    oracle net services
Presentation oracle net services
 
Oracle DBA
Oracle DBAOracle DBA
Oracle DBA
 
Oracle architecture
Oracle architectureOracle architecture
Oracle architecture
 
MySQL Architecture and Engine
MySQL Architecture and EngineMySQL Architecture and Engine
MySQL Architecture and Engine
 
Multidimentional data model
Multidimentional data modelMultidimentional data model
Multidimentional data model
 
Google Bigtable
Google BigtableGoogle Bigtable
Google Bigtable
 
Oracle Tablespace - Basic
Oracle Tablespace - BasicOracle Tablespace - Basic
Oracle Tablespace - Basic
 
Storage Virtualization
Storage VirtualizationStorage Virtualization
Storage Virtualization
 
Object oriented databases
Object oriented databasesObject oriented databases
Object oriented databases
 
Google BigTable
Google BigTableGoogle BigTable
Google BigTable
 
Virtualization and cloud computing
Virtualization and cloud computingVirtualization and cloud computing
Virtualization and cloud computing
 
VTU 6th Sem Elective CSE - Module 4 cloud computing
VTU 6th Sem Elective CSE - Module 4  cloud computingVTU 6th Sem Elective CSE - Module 4  cloud computing
VTU 6th Sem Elective CSE - Module 4 cloud computing
 

Similar to Managing Moodle Databases with ClusterControl

Sql interview question part 10
Sql interview question part 10Sql interview question part 10
Sql interview question part 10kaashiv1
 
Sql interview question part 9
Sql interview question part 9Sql interview question part 9
Sql interview question part 9kaashiv1
 
Sql interview-question-part-9
Sql interview-question-part-9Sql interview-question-part-9
Sql interview-question-part-9kaashiv1
 
Accelerating Cloud Training With Alluxio
Accelerating Cloud Training With AlluxioAccelerating Cloud Training With Alluxio
Accelerating Cloud Training With AlluxioAlluxio, Inc.
 
BITS: Introduction to MySQL - Introduction and Installation
BITS: Introduction to MySQL - Introduction and InstallationBITS: Introduction to MySQL - Introduction and Installation
BITS: Introduction to MySQL - Introduction and InstallationBITS
 
Dataweave Libraries and ObjectStore
Dataweave Libraries and ObjectStoreDataweave Libraries and ObjectStore
Dataweave Libraries and ObjectStoreVikalp Bhalia
 
MySQL Cluster 8.0 tutorial
MySQL Cluster 8.0 tutorialMySQL Cluster 8.0 tutorial
MySQL Cluster 8.0 tutorialFrazer Clement
 
Sql Server tips from the field
Sql Server tips from the fieldSql Server tips from the field
Sql Server tips from the fieldInnoTech
 
Big Data: Big SQL web tooling (Data Server Manager) self-study lab
Big Data:  Big SQL web tooling (Data Server Manager) self-study labBig Data:  Big SQL web tooling (Data Server Manager) self-study lab
Big Data: Big SQL web tooling (Data Server Manager) self-study labCynthia Saracco
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Olivier DASINI
 
MS SQL Backups explained by a DBA
MS SQL Backups explained by a DBAMS SQL Backups explained by a DBA
MS SQL Backups explained by a DBAWally Pons
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best PracticesOlivier DASINI
 
DevTalks.ro 2019 What's New in MySQL 8.0 Security
DevTalks.ro 2019 What's New in MySQL 8.0 SecurityDevTalks.ro 2019 What's New in MySQL 8.0 Security
DevTalks.ro 2019 What's New in MySQL 8.0 SecurityGeorgi Kodinov
 
The Proper Care and Feeding of MySQL Databases
The Proper Care and Feeding of MySQL DatabasesThe Proper Care and Feeding of MySQL Databases
The Proper Care and Feeding of MySQL DatabasesDave Stokes
 
New Capabilities with Cognos Data Modules
New Capabilities with Cognos Data ModulesNew Capabilities with Cognos Data Modules
New Capabilities with Cognos Data ModulesSenturus
 

Similar to Managing Moodle Databases with ClusterControl (20)

Sql interview question part 10
Sql interview question part 10Sql interview question part 10
Sql interview question part 10
 
Ebook10
Ebook10Ebook10
Ebook10
 
Ebook9
Ebook9Ebook9
Ebook9
 
Sql interview question part 9
Sql interview question part 9Sql interview question part 9
Sql interview question part 9
 
Ebook9
Ebook9Ebook9
Ebook9
 
Sql interview-question-part-9
Sql interview-question-part-9Sql interview-question-part-9
Sql interview-question-part-9
 
Alejandro_Laverdet - EN
Alejandro_Laverdet - ENAlejandro_Laverdet - EN
Alejandro_Laverdet - EN
 
Accelerating Cloud Training With Alluxio
Accelerating Cloud Training With AlluxioAccelerating Cloud Training With Alluxio
Accelerating Cloud Training With Alluxio
 
BITS: Introduction to MySQL - Introduction and Installation
BITS: Introduction to MySQL - Introduction and InstallationBITS: Introduction to MySQL - Introduction and Installation
BITS: Introduction to MySQL - Introduction and Installation
 
Dataweave Libraries and ObjectStore
Dataweave Libraries and ObjectStoreDataweave Libraries and ObjectStore
Dataweave Libraries and ObjectStore
 
MySQL Cluster 8.0 tutorial
MySQL Cluster 8.0 tutorialMySQL Cluster 8.0 tutorial
MySQL Cluster 8.0 tutorial
 
Sql Server tips from the field
Sql Server tips from the fieldSql Server tips from the field
Sql Server tips from the field
 
Big Data: Big SQL web tooling (Data Server Manager) self-study lab
Big Data:  Big SQL web tooling (Data Server Manager) self-study labBig Data:  Big SQL web tooling (Data Server Manager) self-study lab
Big Data: Big SQL web tooling (Data Server Manager) self-study lab
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0
 
58750024 datastage-student-guide
58750024 datastage-student-guide58750024 datastage-student-guide
58750024 datastage-student-guide
 
MS SQL Backups explained by a DBA
MS SQL Backups explained by a DBAMS SQL Backups explained by a DBA
MS SQL Backups explained by a DBA
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best Practices
 
DevTalks.ro 2019 What's New in MySQL 8.0 Security
DevTalks.ro 2019 What's New in MySQL 8.0 SecurityDevTalks.ro 2019 What's New in MySQL 8.0 Security
DevTalks.ro 2019 What's New in MySQL 8.0 Security
 
The Proper Care and Feeding of MySQL Databases
The Proper Care and Feeding of MySQL DatabasesThe Proper Care and Feeding of MySQL Databases
The Proper Care and Feeding of MySQL Databases
 
New Capabilities with Cognos Data Modules
New Capabilities with Cognos Data ModulesNew Capabilities with Cognos Data Modules
New Capabilities with Cognos Data Modules
 

More from Severalnines

Cloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaSCloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaSSeveralnines
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudSeveralnines
 
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSeveralnines
 
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...Severalnines
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBSeveralnines
 
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlWebinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlSeveralnines
 
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Severalnines
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Severalnines
 
Disaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBDisaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBSeveralnines
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseSeveralnines
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBSeveralnines
 
Advanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerAdvanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerSeveralnines
 
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifePolyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifeSeveralnines
 
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Severalnines
 
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLWebinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLSeveralnines
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningSeveralnines
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBSeveralnines
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Severalnines
 
Webinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilityWebinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilitySeveralnines
 
Webinar slides: How to Get Started with Open Source Database Management
Webinar slides: How to Get Started with Open Source Database ManagementWebinar slides: How to Get Started with Open Source Database Management
Webinar slides: How to Get Started with Open Source Database ManagementSeveralnines
 

More from Severalnines (20)

Cloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaSCloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaS
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
 
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
 
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDB
 
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlWebinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
 
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
 
Disaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBDisaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDB
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash Course
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDB
 
Advanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerAdvanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona Server
 
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifePolyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
 
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
 
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLWebinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?
 
Webinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilityWebinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High Availability
 
Webinar slides: How to Get Started with Open Source Database Management
Webinar slides: How to Get Started with Open Source Database ManagementWebinar slides: How to Get Started with Open Source Database Management
Webinar slides: How to Get Started with Open Source Database Management
 

Recently uploaded

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Managing Moodle Databases with ClusterControl

  • 1. Copyright 2020 Severalnines AB Lukas Vileikis, Marketing Manager, Severalnines Presenter lukasvileikis.com lukas@severalnines.com Managing the Moodle Database: Getting Started January 27th, 2021
  • 2. Copyright 2020 Severalnines AB Copyright 2019 Severalnines AB Agenda 2
  • 3. Copyright 2020 Severalnines AB Agenda ● What is the Moodle Database? ● Moodle Database Configuration ● What to Monitor in the Moodle Database? ● Moodle Database Schema ● Database Activity in Moodle ● Managing the Moodle Database with ClusterControl 3
  • 4. Copyright 2020 Severalnines AB 4 ● Moodle database stores ○ all of the information related to Moodle. ● Moodle supports MySQL, MariaDB, PostgreSQL, MS SQL and Oracle databases. ● The most frequently used database for Moodle is MySQL. What is the Moodle Database?
  • 6. Copyright 2020 Severalnines AB 6 ● Moodle has thousands of plugins available - the plugin list includes 1,769 plugins. ○ The plugin list includes gamification plugins, questionnaire plugins, certificate plugins etc. ○ Each plugin comes with its own schema. Moodle Plug-ins
  • 7. Copyright 2020 Severalnines AB Copyright 2019 Severalnines AB Moodle Database Configuration and Monitoring 7
  • 8. Copyright 2020 Severalnines AB 8 ● Moodle Database Configuration File @ /var/www/html/moodle/config.php: $CFG->dbtype = 'mariadb'; // 'pgsql', 'mariadb', 'mysqli', 'sqlsrv' or 'oci' $CFG->dblibrary = 'native'; // 'native' only at the moment $CFG->dbhost = '10.10.10.134'; // eg 'localhost' or 'db.isp.com' or IP $CFG->dbname = 'moodle'; // database name, eg moodle $CFG->dbuser = 'moodleuser'; // your database username $CFG->dbpass = 'moodlepass'; // your database password $CFG->prefix = 'mdl_'; // prefix to use for all table names $CFG->dboptions = array( 'dbpersist' => false, // ‘false’ - most stable setting, ‘true’ sometimes improves performance 'dbsocket' => false, // Should connection via UNIX socket be used? 'dbport' => '', // The TCP port. Leave empty for the default port 'dbhandlesoptions' => false, // pgbouncer doesn’t support advanced options on connection 'dbcollation' => 'utf8mb4_unicode_ci' // database collation, best to leave at default ); Moodle Database Configuration
  • 10. Copyright 2020 Severalnines AB 10 What to Monitor in Moodle? What to Do? How to Do It? Take two things into account Take into account the OS and the database. Monitor the metrics in the context of your system Look for alterations in the behavioral patterns: excessive CPU usage might be a problem, high RAM usage probably means that you need to check your DB configuration, high load average could be generated by excessive CPU, RAM or disk usage. Monitor your database Monitor your queries, the amount of active sessions, database locks etc.
  • 11. Copyright 2020 Severalnines AB 11 What to Monitor in Moodle? What to Monitor? How to Do It? Queries Know what data they access, are they using indexes or partitions, what are their patterns. Use EXPLAIN. Active sessions If the number is high, increment the maximum value or check if something is wrong. Database locks If you have a query waiting for another query, check if it should be running in the first place. Backups Make sure they are up to date and can be restored.
  • 12. Copyright 2020 Severalnines AB Copyright 2019 Severalnines AB Moodle Database Schema 12
  • 13. Copyright 2020 Severalnines AB 13 Moodle Database Schema What do You Need to Do to Begin Working with Moodle? How to Do It? Create a database that stores the Moodle tables in MySQL, change the default character set and collation to UTF-8, also grant privileges. Run the following queries: CREATE DATABASE moodle DEFAULT CHARACTER SET UTF8; GRANT ALL PRIVILEGES ON moodle.* TO ‘moodleuser’@’localhost’ IDENTIFIED BY ‘password’; FLUSH PRIVILEGES; Keep in mind the effects of the privileges. Keep in mind that GRANT ALL PRIVILEGES allows a MySQL user full access to a designated database.
  • 14. Copyright 2020 Severalnines AB 14 Moodle Database Schema Category of Database Schemas About Configuration tables Consists of the following tables: config, config_log, config_plugins Users and their profile tables Consists of the following tables: user, user_enrolments, user_info_category, user_info_data, user_info_field, user_lastaccess, user_preferences, user_private_key
  • 15. Copyright 2020 Severalnines AB 15 ● Moodle’s database activity allows you to build, display and search entries (files, images, links to websites, text...) on a topic of your choice. ● Activities can be: ○ Moderated ○ Commented ○ Rated ○ Displayed as a list or individually Database Activity in Moodle
  • 16. Copyright 2020 Severalnines AB 16 ● To add a database activity, turn on the editing, then select database from the activity chooser. Database activities can also have names and descriptions: Database Activity in Moodle Log in as a teacher, then turn on editing.
  • 17. Copyright 2020 Severalnines AB 17 ● Database activities work through views ○ student views and teacher views ● In a student view, students can click on the Database icon in the course to access it and add entries. ● In a teacher view, teachers can see the set up tabs and can edit, delete, approve and unapprove entries as required. Database Activity in Moodle – How Does it Work?
  • 18. Copyright 2020 Severalnines AB Copyright 2019 Severalnines AB Moodle Database and ClusterControl 18
  • 19. Copyright 2020 Severalnines AB 19 ● ClusterControl can help you with load balancing, adding or removing slave nodes, automatic failover and recovery, backups and more: ○ Monitor your database servers in real-time ○ Create alerts which inform of events in your database ○ Scale-out your database ■ multi-master ■ primary with multiple secondaries Monitoring the Moodle Database with ClusterControl
  • 20. Copyright 2020 Severalnines AB 20 ● Provides a unified view of all DB instances (even across multiple datacenters) letting you see the big picture or individual nodes. ● Backup management ○ Centralizes backups to protect, secure and recover your data ○ Backup verification feature to ensure backups are restorable ○ Support for different native backup methods ■ XtraBackup, MariaBackup, pg_basebackup, pgbackrest, among others... Monitoring the Moodle Database with ClusterControl
  • 21. Copyright 2020 Severalnines AB 21 Monitoring the Moodle Database with ClusterControl What can ClusterControl help with? How? Security Manage database users and roles (ClusterControl -> Your Cluster -> Manage -> Schema and Users (or User Management for PostgreSQL). Logs See the ClusterControl log section. Integration with your custom automation scripts s9s CLI available
  • 22. Copyright 2020 Severalnines AB 22 Hardware specs (CPU clock, cores, disk subsystem, RAM, swap, NIC, etc) Hardware specs (CPU clock, cores, disk subsystem, RAM, swap, NIC, etc) Monitoring the Moodle Database with ClusterControl - Backups mysqldump, Percona XtraBackup, MariaDB Backup, NDB Backup Backups can be uploaded to the cloud and restored
  • 23. Copyright 2020 Severalnines AB 23 Monitoring the Moodle Database with ClusterControl - Overview
  • 24. Copyright 2020 Severalnines AB 24 Monitoring the Moodle Database with ClusterControl - Query Monitoring
  • 25. Copyright 2020 Severalnines AB 25 Adding a New Integration
  • 26. Copyright 2020 Severalnines AB Lukas Vileikis, Severalnines Severalnines.com lukasvileikis.com Thank You! ☺ 26