Kiril

Moodle – Mysql query initiate new DB for Moodle

How to create Data Base for Moodle Instance via CLI Mode

run: CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON moodle.* to 'youredbusername'@'localhost' identified by 'yourepassword'; 

Kiril

Moodle -Query to change all users details

UPDATE mdl_user 
SET
username=CONCAT('username',mdl_user.id),
phone1=CONCAT('11111',mdl_user.id),
phone2=CONCAT('11111',mdl_user.id),
firstname=CONCAT('Name',mdl_user.id),
lastname=CONCAT('Last',mdl_user.id),
email=CONCAT('email',mdl_user.id,'@test.com'),
idnumber= CONCAT('1000',mdl_user.id,'2000')
WHERE id>=7