To find the total numbers of users from a Moodle database you can simply run a MySQL command. This can be accomplished from your control panel (cPanel, DirectAdmin etc >> phpMyAdmin) or from the command line.
To get the numbers of users from the Moodle database:
- Log into your control panel – cPanel, DirectAdmin
- Navigate to phpMyAdmin
- Select the Moodle database on the left.
- Go to the SQL tab and run the command:
SELECT COUNT(tablerefix_user.username) FROM `tableprefix_user`
tableprefix can vary from installation to installation. In our case for example it was:
SELECT COUNT(mdloa_user.username) FROM `mdloa_user`
The result is:
You can find the database name and the table prefix in the config.php file from root of your Moodle installation:
<?php // Moodle configuration file .... $CFG->dbname = 'plothost_mood630'; .... $CFG->prefix = 'mdloa_'; ....
For Moodle hosting plans with 24/7 technical support please visit https://plothost.com/moodle-hosting/