Tuning performance Mariadb/ MySQL
Add more config (maybe at /etc/my.cnf.d/server.conf): With a powerful server, can adjust I/O: How to find the good innodb_buffer_pool_size number? Here is Recommended InnoDB Buffer Pool Size: Or adjust more 10%: After your DB run with new config in a period time (daily, weekly,…), check how many memory in used. This Data_MB number can be…
Count the usage size of Mariadb/MySQL
Query: Result:
MariaDB / MySQL write and read Log files on Centos / Rocky Linux
By default, mariaDB never write logs hers for you. Sure, it’s her privacy that she doesn’t want others to know. However, you can enable her logging like this: Make your logs folder and change permission: Edit this file /etc/my.cnf.d/server.conf or /etc/my.cnf.d like as below: Restart your mariadb: Now, you have three file: /var/log/mariadb/error.log /var/log/mariadb/mysql.log /var/log/mariadb/slow.log…
Error: MySQL server has gone away
“MySQL server has gone away”: This is an error when you tried to import a large file to MySQL/MariaDB. So, you can temporatly set max_allowed_packet by below guide: Your file size (MB): X Your file size (bytes): Y = X*1024*1024. Example: X = 2GB => Y = 2,097,152,000,000 Your import commands likes this:
Automated Database Backup (MariaDB, MySQL) on RHEL/Linux using Cron Job?
Have you thought about continuous database backup? Perhaps using the Control Panel is the choice of many people. But it will not be optimal in case you want to customize the backup file name. Or your server only runs MySQL, MariaDB (without Control Panel, no PHP,…). I will show you how to Automated Smart Database…