Thursday, June 22, 2023

.::: Enable Log MariaDB MySQL & limited Size Log :::.


1. Check directory mariadb
[root@teguhth mysql]# pwd
/var/lib/mysql
[root@teguhth mysql]#
[root@teguhth mysql]# ls
aria_log.00000001  ib_buffer_pool  ib_logfile0  multi-master.info  mysql.sock          performance_schema  teguhth
aria_log_control   ibdata1         ibtmp1       mysql              mysql_upgrade_info  secretdb            teguhth.pid
[root@teguhth mysql]#


2. additional log etc/my.cnf.d/server.cnf
log-error = /var/lib/mysql/mysql_error.log
#relay-log-space-limit=15G
relay-log-space-limit=1m

[root@teguhth mysql]# cat /etc/my.cnf.d/server.cnf
.........
[mariadb]
log-error = /var/lib/mysql/mysql_error.log
#relay-log-space-limit=15G
relay-log-space-limit=1m

.........

[root@teguhth mysql]#


3. restart mariadb
[root@teguhth mysql]#
[root@teguhth mysql]# systemctl restart mariadb
[root@teguhth mysql]#


4. check file log
[root@teguhth mysql]# pwd
/var/lib/mysql
[root@teguhth mysql]#
[root@teguhth mysql]# ls
aria_log.00000001  ib_buffer_pool  ib_logfile0  multi-master.info  mysql_error.log  mysql_upgrade_info  secretdb  teguhth.pid
aria_log_control   ibdata1         ibtmp1       mysql              mysql.sock       performance_schema  teguhth
[root@teguhth mysql]#


5. check contain log
[root@teguhth mysql]# cat /var/lib/mysql/mysql_error.log
2023-06-22 13:19:24 0 [Note] Starting MariaDB 10.5.21-MariaDB source revision bed70468ea08c2820647f5e3ac006a9ff88144ac as process 1309
2023-06-22 13:19:24 0 [Note] InnoDB: Uses event mutexes
2023-06-22 13:19:24 0 [Note] InnoDB: Compressed tables use zlib 1.2.7
2023-06-22 13:19:24 0 [Note] InnoDB: Number of pools: 1
2023-06-22 13:19:24 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-06-22 13:19:24 0 [Note] InnoDB: Using Linux native AIO
2023-06-22 13:19:24 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2023-06-22 13:19:24 0 [Note] InnoDB: Completed initialization of buffer pool
2023-06-22 13:19:24 0 [Note] InnoDB: 128 rollback segments are active.
2023-06-22 13:19:24 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-06-22 13:19:24 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-06-22 13:19:24 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2023-06-22 13:19:24 0 [Note] InnoDB: 10.5.21 started; log sequence number 386267; transaction id 728
2023-06-22 13:19:24 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-06-22 13:19:24 0 [Note] Server socket created on IP: '::'.
2023-06-22 13:19:24 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2023-06-22 13:19:24 0 [Note] Reading of all Master_info entries succeeded
2023-06-22 13:19:24 0 [Note] Added new Master_info '' to hash table
2023-06-22 13:19:24 0 [Note] /usr/sbin/mariadbd: ready for connections.
Version: '10.5.21-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
2023-06-22 13:19:24 0 [Note] InnoDB: Buffer pool(s) load completed at 230622 13:19:24
[root@teguhth mysql]#




No comments:

Post a Comment

Popular Posts