Task 1
Task 1
2 MariaDB
install mariadb version 10.6 and do the following Tune the mysql using MySQLTuner script Enable query
log Enable slow query log Create database named "Mohamed" Create table name “ axispay” Insert
dummy data
Run the security script to set the root password and secure the installation:
sudo mysql_secure_installation
Follow the prompts to set the root password, remove anonymous users, disable remote root login,
remove the test database, and reload privilege tables.
MySQLTuner is a Perl script designed to assist with the tuning of MySQL and MariaDB servers. It connects
to a running MySQL server, analyzes its performance, and provides recommendations for configuration
improvements.
1. Download MySQLTuner:
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl
chmod +x mysqltuner.pl
3. Run MySQLTuner:
sudo ./mysqltuner.pl
MySQLTuner will analyze your MariaDB configuration and suggest optimizations. Review and apply the
suggestions as needed.
general_log_file = /var/log/mysql/query.log
general_log =1
This enables the general query log, which logs all queries executed by MariaDB.
3. Restart MariaDB:
slow_query_log = 1
slow_query_log_file = /var/log/mysql/slow.log
long_query_time = 1
This enables the slow query log, which logs queries that take longer than 1 second to execute.
3. Restart MariaDB:
USE Mohamed;
);
INSERT INTO axispay (name, amount) VALUES ('John Doe', 1000.00), ('Jane Smith', 2000.00);
This completes the installation and configuration of MariaDB 10.6, including creating the "Mohamed"
database and "axispay" table, along with inserting dummy data. Let me know if you need further
assistance!