03Mariadb - amagerard/Wiki GitHub Wiki

HOME

Return to the list of wikis

RedHat10/Wikijs

1- Network 2- NodejsRedis 3- Mariadb 4- Wikijs 5- Nginx
6- Selinux 7- UpdateWikijs 8- Backup 9- GnomeShell 10 Troubleshoots

3. Mariadb

3.1 Installation.

Mariadb update.
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | bash -
The mariadb-masxcale url is out of service.
Put enabled = 0 .
vi /etc/yum.repos.d/mariadb.repo

[mariadb-maxscale]  
# To use the latest stable release of MaxScale, use "latest" as the version  
# To use the latest beta (or stable if no current beta) release of MaxScale, use "beta" as the version  
name = MariaDB MaxScale  
baseurl = https://dlm.mariadb.com/repo/maxscale/latest/yum/rhel/10/x86_64  
gpgkey = file:///etc/pki/rpm-gpg/MariaDB-MaxScale-GPG-KEY  
gpgcheck = 1  
enabled = 0  

dnf update
dnf install MariaDB-server
systemctl enable --now mariadb

3.2 Secure MariaDB.

mariadb-secure-installation
The root password in this example is: "X2m56AB50!".

Enter current password for root (enter for none):  
Switch to unix_socket authentication [Y/n] n  
 ... skipping.  
You already have your root account protected, so you can safely answer 'n'.  
Change the root password? [Y/n] y  
New password: X2m56AB50!  
 ... Success!  
Remove anonymous users? [Y/n] y  
 ... Success!  
Disallow root login remotely? [Y/n] y  
 ... Success!  
Remove test database and access to it? [Y/n] y  
 - Dropping test database...  
 ... Success!  
 - Removing privileges on test database...  
 ... Success!  
Reload privilege tables now? [Y/n] y  
 ... Success!  
Cleaning up...  
All done!  

Change password for root@localhost.
mariadb -u root -p mysql
Enter.
MariaDB [mysql]> alter user 'root'@'localhost' identified by 'X2m56AB50!';
exit

3.3 Create wikijs database.

Create wikijs database with user wikijs@locahost and password: "641fqAB4d".
mariadb -u root -p -e "create database wikijs default character set utf8mb4 collate utf8mb4_bin;"
mariadb -u root -p -e "CREATE USER 'wikijs'@'localhost' IDENTIFIED BY '641fqAB4d';"
mariadb -u root -p -e "grant all privileges on *.* to wikijs@localhost;"
mariadb -u root -p -e "flush privileges;"

⚠️ **GitHub.com Fallback** ⚠️