How to set and enable MariaDB slow query log

To enable and set up the slow query log in MariaDB, you need to modify the configuration file my.cnf and restart the MariaDB service. Here are the steps to enable the slow query log in MariaDB: Open the my.cnf configuration file: sudo nano /etc/my.cnf Add the following lines to the configuration file: [mysqld] slow_query_log = … Read more

How to set up MariaDB Master Slave replication with SSL on Ubuntu Linux

Setting up MariaDB Master-Slave replication with SSL on Ubuntu Linux involves the following steps: Install MariaDB on both the master and the slave servers. On the master server, open the MariaDB configuration file: sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf Add the following lines to the file: server-id = 1 log_bin = /var/log/mysql/mariadb-bin.log bind-address = <master_server_ip> Save and close … Read more

How to increase and set upload size to 100MB in PHP-Apache

To increase the maximum upload size to 100 MB in PHP running on Apache, you can follow these steps: Open the PHP configuration file: sudo nano /etc/php/7.x/apache2/php.ini Change the following values: upload_max_filesize = 100M post_max_size = 100M Save and close the file. Restart Apache: sudo systemctl restart apache2 The maximum upload size has now been … Read more

How to use LXD (Linux containers) in a shell script to create VM when the cloud instance launches

You can use LXD (Linux containers) in a shell script to create a virtual machine (VM) when a cloud instance launches by following these steps: Install LXD: sudo apt-get update sudo apt-get install lxd Initialize LXD: sudo lxd init Create a new container: sudo lxc launch ubuntu:18.04 <container_name> Create a shell script to launch the … Read more