CREATE USER 'user1'@'localhost' IDENTIFIED BY 'password1' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK; GRANT USAGE ON *.* TO 'user1'@'localhost'; CREATE USER 'user1'@'127.0.0.1' IDENTIFIED BY 'password1' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK; GRANT USAGE ON *.* TO 'user1'@'127.0.0.1'; CREATE USER 'user1'@'::1' IDENTIFIED BY 'password1' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK; GRANT USAGE ON *.* TO 'user1'@'::1';Ne pas oublier que pour mettre un mots de passe à root, toujours via une console MariaDB, il faut encoyer les commandes suivantes :
ALTER USER 'root'@'localhost' IDENTIFIED BY 'passwordroot' PASSWORD EXPIRE NEVER; ALTER USER 'root'@'localhost' DEFAULT ROLE ALL; GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION; GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION; CREATE USER IF NOT EXISTS 'root'@'127.0.0.1' IDENTIFIED BY 'passwordroot' PASSWORD EXPIRE NEVER; ALTER USER IF EXISTS 'root'@'127.0.0.1' DEFAULT ROLE ALL; GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' WITH GRANT OPTION; CREATE USER IF NOT EXISTS 'root'@'::1' IDENTIFIED BY 'passwordroot' PASSWORD EXPIRE NEVER; ALTER USER IF EXISTS 'root'@'::1' DEFAULT ROLE ALL; GRANT ALL PRIVILEGES ON *.* TO 'root'@'::1' WITH GRANT OPTION;