MariaDB<\/b> database service:<\/p>\n\n\n\nsudo apt-get install mariadb-server -y<\/pre>\n\n\n\nStart and enable the mariadb.service with the following commands:<\/p>\n\n\n\n
sudo systemctl start mariadb && sudo systemctl enable mariadb<\/pre>\n\n\n\nCheck the status of the mariadb.service<\/p>\n\n\n\n
sudo systemctl status mariadb<\/pre>\n\n\n\nYou should receive the following output:<\/p>\n\n\n\n
root@host:~# sudo systemctl status mariadb\n\u25cf mariadb.service - MariaDB 10.5.18 database server\n Loaded: loaded (\/lib\/systemd\/system\/mariadb.service; enabled; vendor preset: enabled)\n Active: active (running) since Wed 2023-03-08 17:42:38 CST; 10s ago\n Docs: man:mariadbd(8)\n https:\/\/mariadb.com\/kb\/en\/library\/systemd\/\n Main PID: 52018 (mariadbd)\n Status: \"Taking your SQL requests now...\"\n Tasks: 18 (limit: 4675)\n Memory: 71.5M\n CPU: 601ms\n CGroup: \/system.slice\/mariadb.service\n \u2514\u250052018 \/usr\/sbin\/mariadbd\n<\/pre>\n\n\n\n<\/span>Step 3. Create a NextCloud Database and User<\/span><\/h2>\n\n\n\nTo create a NextCloud database, the NextCloud user and grant the permissions for that user to the database first log in to MySQL command line with the mysql<\/b> command and execute the following lines of code one by one:<\/p>\n\n\n\n CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';\n CREATE DATABASE nextcloud;\n GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';\n FLUSH PRIVILEGES;\n EXIT;\n<\/pre>\n\n\n\n